Kubespray is the go to tool for deploying self managed Kubernetes clusters. Built on Ansible, Kubespray makes it simple to deploy, update, and expand Kubernetes clusters. I highly recommend Kubespray if you are deploying your own bare-metal Kubernetes cluster or if you want to save money by not using cloud services like GKE (Google Cloud), EKS (AWS) or AKS (Azure).

Kubespray provides plenty of tools for managing Kubernetes, but it doesn’t provide any tools for managing the underlying infrasture. In this post I am going to show how use Ansible to automate zero down time system updates for Kubernetes clusters. The process for completing system updates on Kubernetes clusters is to:

  1. Cordon the node so no new pods are scheduled on the node
  2. Drain the node so all of the existing workloads are moved to other nodes
  3. Update and reboot the node
  4. Finally uncordon the node so new pods can be scheduled on the node

This method can also be used to automate other maintenance tasks on any type of cluster with out causing any down time for your servers.

#kubernetes #ansible

Automating System Updates for Kubernetes Clusters using Ansible
3.95 GEEK