Upgrading a K8 Cluster
Luke Hebert
- One minute read - 166 wordsUpgrading a Kubernetes cluster with kubeadm follows a structured sequence: first upgrade the control plane, then roll out the changes to each worker node. The process involves checking available versions, planning the upgrade, updating the kubeadm binary, applying the upgrade, and verifying that each node reports the correct version.
General Process
- Use the OS-appropriate command to review the available versions.
- Use
kubeadm upgrade planto obtain the upgrade plan and the versions you can move to. - Use the OS-appropriate command to upgrade kubeadm to the matching version.
- Upgrade the control plane. You can drain the node to move some, but not all, services.
- Upgrade the kubelet and kubectl with the OS-appropriate command.
- Restart the
kubelet. - Uncordon the control plane.
- Verify the node versions.
- Move on to the worker nodes.
- Drain each node before upgrading.
- Upgrade
kubeadmand then usekubeadm upgrade node. - Upgrade
kubeletandkubectlto the appropriate versions. - Restart the
kubeletand verify the node version. - Uncordon the node.