A kubernetes node draining scheduler.
This project is a utility allowing to drain nodes within a Kubernetes cluster according to specific rules.
The main use case is the preventive drain of nodes on spot instances at desired times to minimize the risk of preemptions during peak usage.
Follow node-drainer documentation for Helm deployment here.
The node-drainer container takes as argument the parameters below.
Key | Description | Default |
---|---|---|
l | Selector to list the nodes to drain on labels separated by commas (e.g. -l foo=bar,bar=baz ). |
"" |
older-than | The minimum lifespan that a node must have to be drained. | 8h |
count | The number of nodes to drain. | 1 |
max-unscheduled-pods | The maximum number of unscheduled pods on the cluster beyond which the drain will fail. | 0 |
eviction-timeout | The timeout in seconds for pods eviction during node drain. | 300 |
poll-interval | The poll interval in seconds to check pods deletion on drain. | 5 |
dev | Enable dev mode for logging. | false |
v | Logs verbosity. 0 => panic, 1 => error, 2 => warning, 3 => info, 4 => debug | 3 |
By default, node-drainer produces structured logs, with "Info" verbosity. These settings can be configured as described here.
Distributed under the Apache 2.0 License. See LICENSE
for more information.
We use SemVer for versioning.
Got a question? File a GitHub issue.