Kubernetes Node Drainer helps to evict pods from nodes before shutdown.
It is a single statically compiled binary in a minimal container (FROM scratch
) run as non-root user.
A small binary run as a DaemonSet
and listenning for a trigger (e.g. AWS ASG Lifecycle Hook).
When triggered it uses Kubernetes Eviction API to drain the node (just like the kubectl drain
command).
The code is prepared for multiple trigger providers if there is a community interest in such functionality, but currently supported triggers are:
Feel free to create a GitHub Issue for any questions, bug reports or feature requests, also Pull Requests are welcome, just make sure you discuss any major changes before investing a lot of time.
We believe in obvious names. It drains kubernetes nodes. It's kubedrainer
.