Kubernetes Reboot Daemon
open sourceApache-2.0self-hostablefree
Kured (KUbernetes REboot Daemon) is a DaemonSet that reboots Kubernetes nodes safely when the host OS says a reboot is needed: it watches for a sentinel file such as /var/run/reboot-required (or a command's success), takes a lock in the API server so only one node reboots at a time, cordons and drains the node, reboots it and uncordons it afterwards. Reboots can be limited to days and hours, held back while Prometheus alerts fire or selected pods run, and announced to Slack, Rocket.Chat, Microsoft Teams or email. It works on any systemd distribution, installs from a manifest or its own Helm chart, and is an Apache-2.0 CNCF Sandbox project.
Ways to install
On Kubernetes
Problems it solves
- our Kubernetes nodes install security updates but never reboot, so kernel patches don't take effect
- reboot Ubuntu nodes automatically when /var/run/reboot-required appears, without taking the cluster down
- make sure only one Kubernetes node reboots at a time after unattended upgrades
- drain and cordon a node before an OS reboot and uncordon it when it comes back
- only allow automatic node reboots at night or on weekdays in a maintenance window
- don't reboot a node while Prometheus alerts are firing in the cluster
- skip rebooting nodes that are running a batch job or a database pod right now
- post a Slack or Teams message when a Kubernetes node is drained and rebooted
- patch the kernel on bare-metal K3s nodes without logging in to reboot each one
- trigger a node reboot from a custom check command instead of a file
Features
- reboots when a sentinel file exists (default /var/run/reboot-required) or a sentinel command succeeds
- lock in the Kubernetes API server so one node reboots at a time (--concurrency to change)
- cordons and drains before reboot, uncordons after, with drain timeouts, grace periods and pod selectors
- reboot days, start and end times and a time zone
- holds reboots while Prometheus alerts are active, with alert name filters
- --blocking-pod-selector holds a node's reboot while matching pods run on it
- notifications through shoutrrr URLs: Slack, Rocket.Chat, Microsoft Teams and SMTP email, with message templates
- reboot by command (default systemctl reboot) or signal
- node labels before and after reboot, and a PreferNoSchedule taint while one is pending
- Prometheus metrics endpoint
Limitations
- Needs a systemd host OS: Kured enters the host's mount namespace to run systemctl reboot1
Alternatives
The same job
These do what Kured does.
- system-upgrade-controller In your Kubernetes, upgrading your nodes
