Shutdown a node gracefully
Published 28 May 2024
To ensure the cluster remains in a working state after a reboot of a nodes, we have a script to do a graceful shutdown.
sudo bash /opt/ekco/shutdown.sh
We have the following recommendations to shutdown.
- Use a cron job that executes the script 5 minutes before a scheduled maintenance.
- We recommend waiting 30 mins between reboots. Linux OS takes at least 10 mins to reboot.
- For unplanned reboot, have a manual process in place that includes running the script.
- Take regular backups of the VM.
If there's a lot of leftover failed or completed pods after a reboot use these commands to clean them up
kubectl delete pods -A --field-selector=status.phase=Failed kubectl delete pods -A --field-selector=status.phase=Succeeded
If you have problems using redgate clone after a reboot, have a look at this troubleshooting guide.