K8s Cluster Upgrade Control Plane

 


In this post, we will see how to upgrade K8s master and worker node.

kubeadm supports upgrading Kubernetes clusters. 

We will be upgrading Kubernetes from version 1.28.1 to version 1.28.2. 

You should always backup important data before upgrading, and test upgrades before deploying them to production.

The upgrade process follows the general procedure of:

  1. Upgrading the Kubernetes control plane with kubeadm (Kubernetes components and add-ons excluding the CNI)
  2. Manually upgrading the CNI network plugin, if applicable
  3. Upgrading the Kubernetes packages (kubeletkubeadmkubectl) on the control plane and worker nodes
  4. Upgrading the kubelet config on worker nodes with kubeadm.

Login to the control plane node.

To begin the upgrade, first kubeadm needs to be updated to 1.28.2 :

sudo apt-get update

sudo apt-get install -y --allow-change-held-packages kubeadm=1.28.2-00



Restart the kubelet.


Generate an upgrade plan for upgrading Kubernetes to version 1.28.2:

 

Review the plan and apply.



Prepare to upgrade the control plane node's kubelet by draining the node:




Uncordon the control plane to allow pods to be scheduled on it now that is has been upgraded:


We are done with control plane upgrade.

Comments

Popular posts from this blog

SRE/DevOps Syllabus

AWS Code Commit - CI/CD Series Part 1

Docker - Preventing IP overlapping