Having a cookbook to roll-reboot all kubernetes nodes would be very handy in some maintenance situations.
Also, a small & fun coding project.
Something similar to this:
#!/bin/bash SLEEP="30" HOSTS=" tools-k8s-worker-30 tools-k8s-worker-31 tools-k8s-worker-32 tools-k8s-worker-33 tools-k8s-worker-34 tools-k8s-worker-35 tools-k8s-worker-36 tools-k8s-worker-37 tools-k8s-worker-38 tools-k8s-worker-39 tools-k8s-worker-40 tools-k8s-worker-41 tools-k8s-worker-42 tools-k8s-worker-43 tools-k8s-worker-44 tools-k8s-worker-45 tools-k8s-worker-46 tools-k8s-worker-47 tools-k8s-worker-48 tools-k8s-worker-49 tools-k8s-worker-50 tools-k8s-worker-51 tools-k8s-worker-52 tools-k8s-worker-53 tools-k8s-worker-54 tools-k8s-worker-55 tools-k8s-worker-56 tools-k8s-worker-57 tools-k8s-worker-58 tools-k8s-worker-59 tools-k8s-worker-60 tools-k8s-worker-61 tools-k8s-worker-62 tools-k8s-worker-64 tools-k8s-worker-65 tools-k8s-worker-66 tools-k8s-worker-67 tools-k8s-worker-68 tools-k8s-worker-69 tools-k8s-worker-70 tools-k8s-worker-71 tools-k8s-worker-72 tools-k8s-worker-73 tools-k8s-worker-74 tools-k8s-worker-75 tools-k8s-worker-76 tools-k8s-worker-77 tools-k8s-worker-78 tools-k8s-worker-79 tools-k8s-worker-80 tools-k8s-worker-81 tools-k8s-worker-82 " for worker in $HOSTS ; do echo "Rebooting $worker" ssh $worker "sudo reboot" sleep $SLEEP while true ; do echo "Checking $worker" ssh $worker uptime && break echo "waiting" done done