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

# How to Upgrade Kubeadm Cluster?
- URL: https://comtechies.com/upgrade-kubeadm-cluster/
- Published: 2024-01-23T16:32:17.000Z
- Updated: 2025-08-15T14:14:01.000Z
- Author: Arun Lal
- Tags: kubernetes, #Migrated-1755084814468, #wp, #wp-post, #Import 2025-08-13 11:34

In this blog, I am going to demonstrate how we can upgrade the [Kubeadm cluster](https://comtechies.com/upgrade-kubeadm-cluster/) from version 1.27 to 1.28.

Let's see my current Kubeadm Cluster version.

```
kubectl get nodes
```

![list nodes](https://storage.ghost.io/c/98/17/98179ffe-00c9-4599-8b4a-1f5f7ba0565b/content/images/2025/08/image-652.png)

Both Nodes in this cluster are running on the Kubeadm 1.27.1 version, so I am going to upgrade that to version 1.28.0.

## **Upgrade Controlplane**

First, I am going to upgrade the Master Node.

## Step 1: Drain Master Node

```
kubectl drain master-node --ignore-daemonsets
```

![drain nodes](https://storage.ghost.io/c/98/17/98179ffe-00c9-4599-8b4a-1f5f7ba0565b/content/images/2025/08/image-653.png)

```
kubectl get nodes
```

![list nodes](https://storage.ghost.io/c/98/17/98179ffe-00c9-4599-8b4a-1f5f7ba0565b/content/images/2025/08/image-654.png)

I am already in the Master Node, If you are using kubeconfig to connect the Nodes then first you need to enter into the Master Node.

```
ssh master-node
```

sudo permission necessary to upgrade the Kubeadm

```
sudo -i 
```

## Step 2: Upgrade the Kubeadm

Upgrade the Master Node Kubeadm version from v1.27 to v1.28

```
apt-mark unhold kubeadm && \
apt-get update && apt-get install -y kubeadm='1.28.0-00' && \
apt-mark hold kubeadm
```

Once the degradation is completed, we need to ensure the Kubeadm version.

```
kubeadm version
```

![kubeadm upgrade success](https://storage.ghost.io/c/98/17/98179ffe-00c9-4599-8b4a-1f5f7ba0565b/content/images/2025/08/image-655.png)

You can ensure how this upgrade performs before degradation by using the following command.

```
kubeadm upgrade plan
```

![kubeadm upgrade plan](https://storage.ghost.io/c/98/17/98179ffe-00c9-4599-8b4a-1f5f7ba0565b/content/images/2025/08/image-656.png)

Now, I am going to apply this update.

```
kubeadm upgrade apply v1.28.0
```

![kubeadm upgrade success](https://storage.ghost.io/c/98/17/98179ffe-00c9-4599-8b4a-1f5f7ba0565b/content/images/2025/08/image-657.png)

## Step 3: Upgrade Kubelet and Kubectl

After seeing the upgrade's successful output, I am upgrading the Kubelet and the Kubectl

```
apt-mark unhold kubelet kubectl && \
apt-get update && apt-get install -y kubelet='1.28.0-00*' kubectl='1.28.0-00' && \
apt-mark hold kubelet kubectl
```

Once the upgrade is completed, we have to reload the services.

```
systemctl daemon-reload
systemctl restart kubelet
```

If you want to confirm the kubelet service is running without any issues, you can use the following command.

```
systemctl status kubelet
```

Then you need to exit two times from the terminal to reach the initial position.

```
exit
```

```
exit
```

Finally, we need to uncordon the Master Node to schedule Pods.

```
kubectl uncordon master-node
```

## Step 4: Check the Kubeadm Version

If we check the Nodes, we can see that the Master Node version has been changed.

```
kubectl get nodes
```

![kubeadm version ](https://storage.ghost.io/c/98/17/98179ffe-00c9-4599-8b4a-1f5f7ba0565b/content/images/2025/08/image-658.png)

## **Upgrade Worker Nodes**

In Worker nodes also we do the same steps to upgrade the Kubeadm version.

## Step 1: Drain Worker Node

First, need to drain the Worker Node

```
kubectl drain worker-node01 --ignore-daemonsets
```

![kubeadm version](https://storage.ghost.io/c/98/17/98179ffe-00c9-4599-8b4a-1f5f7ba0565b/content/images/2025/08/image-659.png)

Enter into the Secure Shell of the Worker Node

```
ssh worker-node01
```

Sudo permission is required to upgrade Kubeadm

```
sudo -i
```

## Step 2: Upgrade the Kubeadm

Upgrade the Kubeadm.

```
apt-mark unhold kubeadm && \
apt-get update && apt-get install -y kubeadm='1.28.0-00' && \
apt-mark hold kubeadm
```

Now, let's upgrade the Node.

```
kubeadm upgrade node
```

## Step 3: Upgrade Kubelet and Kubectl

After successfully upgrading the Node, we have to upgrade the Kubelet and Kubeclt.

```
apt-mark unhold kubelet kubectl && \
apt-get update && apt-get install -y kubelet='1.28.0-00' kubectl='1.28.0-00' && \
apt-mark hold kubelet kubectl
```

Once the upgrade process is completed, the services should be reloaded.

```
systemctl daemon-reload
systemctl restart kubelet
```

Now, we have to exit from the sudo shell as well as from the SSH

```
exit
```

Uncordon the Worker Node to accept scheduling Pods.

```
kubectl uncordon worker-node01
```

## Step 4: Check the Node Version

List the Nodes and ensure the version of the Nodes.

```
kubectl get nodes
```

![list nodes](https://storage.ghost.io/c/98/17/98179ffe-00c9-4599-8b4a-1f5f7ba0565b/content/images/2025/08/image-660.png)

## Conclusion

This document explains how we can upgrade our Kubeadm cluster from version 1.27 to 1.28, and always ensure the steps are properly followed on the upgrade, also don't forget to confirm the version at the end of the upgrade.

Also, cluster upgrade is an important task in CKA certification. If you are preparin for the certification, make use of the [CKA coupon](https://comtechies.com/linux-foundation-coupon/) from the Linux Foundation coupon page.