> ## Content Index
> Fetch the complete content index at: https://devopscube.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Upgrade Kubernetes Cluster Using Kubeadm?
- URL: https://devopscube.com/upgrade-kubernetes-cluster-kubeadm/
- Published: 2026-04-01T01:54:00.000Z
- Updated: 2026-04-02T11:31:38.000Z
- Author: Bibin Wilson
- Tags: HOW TO GUIDES, Kubernetes, #Migrated-1741795015845, #wp, #wp-post, #Import 2025-03-12 15:57, #blog

In [kubernetes tutorial](https://devopscube.com/kubernetes-tutorials-beginners/), I have added step-by-step guides to upgrade the Kubernetes cluster using Kubeadm. It is one of the important tasks in the CKA Exam.

In another blog, I have covered the [Kubeadm cluster setup](https://devopscube.com/setup-kubernetes-cluster-kubeadm/). You can follow it to deploy a fresh cluser for testing the upgrade.

## Kubeadm Kubernetes Cluster Upgrade

****Note:** In this example, I will be upgrading Kubernetes version 1.34.0 to 1.34.6\. Please replace the version numbers as per your existing version and upgrade requirement.

We need to run the upgrades in the following order

1. Control plane node
2. Worker Nodes

Also, we need to upgrade the following components on both the control plane and the worker nodes.

1. Kubeadm
2. Kubelet
3. Kubectl

Before we get started **you should know the cluster and node names**. Execute the following command to get the node names.

```bash
kubectl get nodes
```

You will get the following output.

```bash
NAME           STATUS   ROLES           AGE    VERSION
controlplane   Ready    control-plane   7d7h   v1.34.0
node01         Ready    worker          7d7h   v1.34.0
```

## Upgrade The Control Plane

Following are the high level steps for the control plane upgrade

1. Login to control plane
2. Check the existing version
3. unhold kubeadm and Install the latest kubeadm version
4. Decide on the upgrade version by running a kubeadm upgrade plan (Same version patch or new version)
5. Apply Kubeadm upgrade
6. Evict all workloads from control plane except daemonsets
7. Upgrade kubectl and kubelet.
8. Make the control plane schedulable (Uncordon)

Lets get started with the Upgrade.

### Step 1: Check the existing Kubeadm version

Login to the control plane and can check the existing version using the following command.

```bash
kubeadm version -o json
```

You will get the following output.

```bash
{
  "clientVersion": {
    "major": "1",
    "minor": "34",
    "gitVersion": "v1.34.0",
    "gitCommit": "f28b4c9efbca5c5c0af716d9f2d5702667ee8a45",
    "gitTreeState": "clean",
    "buildDate": "2025-08-27T10:15:59Z",
    "goVersion": "go1.24.6",
    "compiler": "gc",
    "platform": "linux/arm64"
  }
}
```

### Step 2: unhold kubeadm and Install the latest version

During the Kubeadm cluster installation process, you would have hold the kubeadm installation to prevent upgrades.

Now we need to unhold kubeadm.

```bash
sudo apt-mark unhold kubeadm 
```

Check the available latest Kubeadm version using the following command.

```bash
sudo apt-cache madison kubeadm | tac
```

You will get the following output.

```bash
   kubeadm | 1.34.0-1.1 | https://pkgs.k8s.io/core:/stable:/v1.34/deb  Packages
   kubeadm | 1.34.1-1.1 | https://pkgs.k8s.io/core:/stable:/v1.34/deb  Packages
   kubeadm | 1.34.2-1.1 | https://pkgs.k8s.io/core:/stable:/v1.34/deb  Packages
   kubeadm | 1.34.3-1.1 | https://pkgs.k8s.io/core:/stable:/v1.34/deb  Packages
   kubeadm | 1.34.4-1.1 | https://pkgs.k8s.io/core:/stable:/v1.34/deb  Packages
   kubeadm | 1.34.5-1.1 | https://pkgs.k8s.io/core:/stable:/v1.34/deb  Packages
   kubeadm | 1.34.6-1.1 | https://pkgs.k8s.io/core:/stable:/v1.34/deb  Packages
```

In my case the latest version is **`1.34.6-1.1`**. Update and install the latest version using the following command. Replace the version number you get from the output.

```bash
sudo apt-get update -y
sudo apt-get install -y kubeadm=1.34.6-1.1
```

Hold kubeadm package.

```bash
sudo apt-mark hold kubeadm
```

### Step 3: Decide on the upgrade version

You can get the list of available kubernetes version using the kubeadm upgrade plan.

```bash
sudo kubeadm upgrade plan
```

The output will show the version that can be applied for the upgrade. In my case the version to be upgraded is **v1.34.6**. Change this version as per your output.

## Step 4: Apply Kubeadm upgrade

Apply the upgrade using the following command with the version.

```bash
kubeadm upgrade apply v1.34.6
```

Now if you check the kubeadm version, you can see the upgraded version.

```bash
{
  "clientVersion": {
    "major": "1",
    "minor": "34",
    "gitVersion": "v1.34.6",
    "gitCommit": "8b2bf66ce7018f6e13e8767624d4ce7768a8a2e5",
    "gitTreeState": "clean",
    "buildDate": "2026-03-18T19:18:06Z",
    "goVersion": "go1.24.13",
    "compiler": "gc",
    "platform": "linux/arm64"
  }
}
```

### Step 6: Drain the Node to evict all workloads.

To apply the upgrade we nee to evict all the workloads except daemonsets using the following command. Replace **`controlplane`** with your controlplane node name.

```bash
kubectl drain controlplane --ignore-daemonsets
```

### Step 7: Upgrade Kubelet and Kubectl.

Unhold and upgrade kubectl and kubelet using the following commands.

```bash
sudo apt-mark unhold kubelet kubectl 
sudo apt-get update
sudo apt-get install -y kubelet=1.34.6-1.1 kubectl=1.34.6-1.1
sudo apt-mark hold kubelet kubectl
```

Restart the services.

```bash
sudo systemctl daemon-reload
sudo systemctl restart kubelet
```

### Step 7: Uncordon the Node and Verify the Node Status

Use the following command to uncordon the control plane node

```bash
kubectl uncordon controlplane
```

Verify the node status and version using the following command.

```bash
kubectl get nodes
```

You can see the control plane upgraded to the new version and nodes running on the old version as shown below.

```bash
NAME           STATUS   ROLES           AGE    VERSION
controlplane   Ready    control-plane   7d7h   v1.34.6  
node01         Ready    worker          7d7h   v1.34.0
```

## Upgrade Worker Nodes

Worker node upgrade steps are similar to control plane upgrade. However the internal upgrade process differ from control plane.

All the following steps should be executed on the Worker node. If you have multiple worker nodes, upgrade one at a time.

### Step 1: Unhold Kubeadm and Install Required Version

Install the required version of Kubeadm on worker nodes. Replace `1.34.6-1.1` with you version.

```bash
sudo apt-mark unhold kubeadm 
sudo apt-get update && sudo apt-get install -y kubeadm=1.34.6-1.1
sudo apt-mark hold kubeadm
```

### Step 2: Upgrde Kubeadm

As you are running the following command on a worker node, it skips all the steps required for the control plane and update only kubelet configuration required for a worker node.

```bash
sudo kubeadm upgrade node
```

### Step 3: Drain the Node

Evict all the pods on the worker node by draining it. Replace **`node01`** with your worker node name. Execute this command from terminal where you have kubectl access.

```bash
kubectl drain node01 --ignore-daemonsets
```

If pods are using local storage, you might get the following error. This is mostly occur in vagrant setup. In CKA exam, you will not probably face this issue.

```
error: unable to drain node "node01" due to error:cannot delete Pods with local storage (use --delete-emptydir-data to override): kube-system/metrics-server-69fb86cf66-nqmhn, continuing command...
There are pending nodes to be drained:
 node01
cannot delete Pods with local storage (use --delete-emptydir-data to override): kube-system/metrics-server-69fb86cf66-nqmhn
```

To rectify that issues, you need to add the `--delete-emptydir-data` as well.

```bash
kubectl drain node01 --ignore-daemonsets --delete-emptydir-data
```

### Step 4: Upgrade Kubelet & Kubectl

Run these commands on worker nodes

```bash
sudo apt-mark unhold kubelet kubectl 
sudo apt-get update
sudo apt-get install -y kubelet=1.34.6-1.1 kubectl=1.34.6-1.1
sudo apt-mark hold kubelet kubectl
```

Restart kubelet

```bash
sudo systemctl daemon-reload
sudo systemctl restart kubelet
```

### Step 5: Uncordon worker node

Execute the following uncordon command from the node where you have kubectl access.

```bash
kubectl uncordon node01
```

## Verify Cluster Upgrade

Now that we have upgraded the control plane node and the worker nodes, lets verify if the cluster is upgraded and working as expected.

Get the node information

```bash
kubectl get nodes
```

You should see the control plane and worker nodes upgraded to the specified version.

```bash
NAME           STATUS   ROLES           AGE    VERSION
controlplane   Ready    control-plane   7d8h   v1.34.6
node01         Ready    worker          7d7h   v1.34.6
```

From the control plane node, you can use any one of the following kubectl commands to check the status of all the cluster components.

```bash
kubectl get --raw='/readyz?verbose'
curl -k https://localhost:6443/livez?verbose
```

![kubernetes API health status](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/api-health-1.png)

Also, check if all the kube-system control node pods are running.

```bash
kubectl get po -n kube-system
```

![verify kube-system pods status](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-31-13.png)

## Conclusion

Kubeadm utility helps you upgrade the Kubernetes cluster control plane and worker nodes without downtime. Ensure you verify the cluster and application status after the upgrade.

Also, Kubeadm cluster upgrade is one of the important topics in Kubernets CKA certification. If you are preparing for CKA exam, you can check out [CKA exam guide](https://devopscube.com/cka-exam-study-guide/).

If you are preparation for Kubernetes certification, checkout the [best Kubernetes certification](https://devopscube.com/best-kubernetes-certifications/) guide that matches your skillset.