Is there a quick way to safely bounce all nodes in a cluster?

I was considering writing an Ansible script to in serial drain, reboot, and uncordon all nodes in a cluster.

Then I imagined this kind of script may already exist in some form.

Insight/tips?

I’ll consider it ‘safe’ if it doesn’t delete pvs. So the bar is low there :laughing:

I made a script.

It is MIT Licensed. Use at your own peril.

Kubo is a packaged version of Kubernetes which is deployed by BOSH. The drain script is what BOSH calls before stopping a worker VM.

This won’t be directly useable without some effort but might give some inspiration of what’s needed for a shutdown script.

https://github.com/kubernetes-sigs/kubespray/tree/master/roles has an upgrade-role. I have never tested them.