This Ansible playbook is designed to safely reboot nodes in a Kubernetes cluster. Rebooting in this fashion will not have an outage. It performs the following tasks:
- Drains the node to ensure that all pods are safely evicted.
- Reboots the node.
- Waits for SSH to come back up on the node.
- Uncordons the node to allow new pods to be scheduled.
Additionally, it waits for the Kubernetes master node to restart and then runs the cloudflared
tunnel.
To run this playbook, use the following command:
ansible-playbook k8reboot.yml