
Preliminary Steps: Updating Package Repositories
Before starting the upgrade, scroll down the official documentation until you find the important note about changing the package repository. Previously, Kubernetes packages were hosted atapp.kubernetes.io and yum.kubernetes.io, but these repositories have been deprecated. You must now use packages.k8s.io to download the latest versions of tools such as kubectl and kubeadm.

Before proceeding, ensure that you update the package repository configuration on every cluster node.
Determine Your Operating System Distribution
To see which operating system you are using, run:Determining the Target Version
To identify the latest available version in the 1.29 series, use these commands:Upgrading the Control Plane Node
Step 1: Upgrade the kubeadm Tool
First, update kubeadm on the control plane node to prepare for the upgrade. Replace the version string with the latest version (e.g., 1.29.3-1.1):Step 2: Run the Upgrade Plan
Before applying the upgrade, conduct a dry run to see the available upgrade options. This command will outline which components upgrade automatically and those requiring manual updates (e.g., kubelet):Step 3: Apply the Upgrade
Initiate the upgrade process for the control plane:kubectl get nodes, the displayed version corresponds to the kubelet, which will still show v1.28.0 until its upgrade is completed.
Upgrading kubelet and kubectl on the Control Plane Node
Drain the Control Plane Node
Before upgrading kubelet (which runs outside the control plane pods), drain the control plane node to ensure safe maintenance:Upgrade kubelet and kubectl
Next, update kubelet and kubectl on the control plane node by specifying the target version:Upgrading Worker Nodes
Follow a similar process to upgrade each worker node.Step 1: Upgrade kubeadm on the Worker Node
On each worker node, upgrade kubeadm with:Step 2: Drain the Worker Node
Drain the worker node to safely upgrade kubelet. Replace<node-name> with the actual name of your worker node:
--ignore-daemonsets flag is used correctly. Refer to kubectl drain --help for further details if needed.
Step 3: Upgrade kubelet and kubectl on the Worker Node
Upgrade the kubelet and kubectl packages with:Summary
This guide has detailed the process of upgrading a Kubernetes cluster using kubeadm. The critical steps include:- Updating the package repository to
packages.k8s.io. - Determining the target version available from the repository.
- Upgrading the control plane by updating kubeadm, applying the upgrade, and then updating kubelet and kubectl.
- Draining nodes before performing kubelet upgrades and uncordoning them afterwards.
- Repeating the process on each worker node.