A Kubernetes controller that responds to node problems with tainting, draining, and custom Jobs. It watches Node conditions reported by Node Problem Detector or another source.
Choose which Node conditions to watch and how to handle them in
app.config.conditions. No conditions are watched by default.
A condition taints and drains the node unless told otherwise.
This example taints and drains the node, then runs the terminate mitigation Job:
app:
enabled: true
config:
conditions:
KernelDeadlock:
mitigationJob:
name: terminateterminate names a template in the jobs map; the cloud examples
define it for AWS, GCP, and Azure.
A mitigation runs these steps, each of which a condition can switch off or leave unset:
- Taint the node with
NoSchedule. - Run a pre-mitigation Job, for example to capture diagnostics before workloads leave.
- Drain the node, respecting PodDisruptionBudgets.
- Run a mitigation Job, for example to terminate the cloud instance.
To mitigate a node by hand, annotate it with clickhouse.com/node-mitigated-condition=Manual.
Manual is a default condition no node reports; any configured condition works the same way.
The controller has no cloud credentials. Give the Jobs the permissions they need through ServiceAccount RBAC or a cloud identity binding.
helm install node-problem-mitigator oci://ghcr.io/clickhouse/charts/node-problem-mitigator \
--namespace node-problem-mitigator --create-namespace --values values.yaml
kubectl -n node-problem-mitigator logs deployment/node-problem-mitigatorHelm installs the latest release. Add --version to pin one.
The chart is disabled by default. Set app.enabled: true to enable it, as in the example above.
The AWS, GCP, and
Azure examples enable cloud termination.
Before deploying them, configure identity for your cluster and review which conditions they watch.
- Use the
enabledkill switch to pause all mitigation, including work in progress. - Use
dry-runto log decisions without changing nodes or launching Jobs. - Set
taint: falseto run only a pre-mitigation Job, without tainting or draining the node. - The global cooldown starts at most one mitigation every 15 minutes by default.
taint: falseconditions are not counted. - Set
forto wait for a sustained failure. - Use exclusions to protect nodes and namespaces.
A started mitigation that taints the node continues after the condition recovers or the configuration changes. See mitigation behavior for the steps, drain timeouts, and stalls.
- Configuration: Helm settings, conditions, exclusions, and runtime configuration.
- Mitigation: pipeline, cooldown, plan ownership, and lifecycle diagrams.
- Jobs: pre-mitigation Jobs, mitigation Jobs, cloud identity, and permissions.
- Operations: pause controls, manual mitigation, metrics, alerts, and troubleshooting.
- Development: local builds, tests, CLI flags, and releases.
Licensed under the Apache License 2.0.