Is there a way to manually taint, drain, uncordon, and untaint a node to cleanly shut it down for OS patching and reboots while maintaining uptime in container replicas?
The underlying kubernetes primitives for draining the node are all you need here: https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/
To summarize:
- On a master node,
gravity shell
and use kubectl to drain the node you want to patch or reboot - Do the action on the node
- On a master node,
gravity shell
and uncordon the node
To maintain uptime of replicas ensure the pod disruption budgets are set accordingly https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
Thank you. That’s exactly what I was looking for.
you can also automate those actions using gravity exec -i <command>
instead of interactive gravity shell
one