0% found this document useful (0 votes)
24 views3 pages

Upgrade Containers

Uploaded by

deepak Gautam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views3 pages

Upgrade Containers

Uploaded by

deepak Gautam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

5. upgrade_containers.

md 2025-08-20

Over time, you will want to upgrade the Kubernetes version of an existing cluster to pick up bug fixes and
new features. The upgrade process has to be performed in a controlled manner to avoid the disruption of
workload currently in execution and to prevent the corruption of cluster nodes.
It is recommended to upgrade from a minor version to a next higher one (e.g., from 1.18.0 to 1.19.0), or from
a patch version to a higher one (e.g., from 1.18.0 to 1.18.3).
Kubernetes cluster may employ one or many control plane nodes to better support high-availability and
scalability concerns. When upgrading a cluster version, this change needs to happen for control plane
nodes one at a time.
Master Node
. Determine upgrade version

kubeadm version

. Install new kubeadm version

apt-get update && apt-get install -y kubeadm=<version>

. kubeadm upgrade plan

kubeadm upgrade plan

. kubeadm upgrade apply

kubeadm upgrade apply <version>

. Drain workload on node

kubectl drain <node-name> --ignore-daemonsets

. Upgrade kubelet and kubectl

apt-get update && apt-get install -y kubelet=<version> kubectl=


<version>

. Restart kubelet process


1/3
5. upgrade_containers.md 2025-08-20

systemctl daemon-reload
systemctl restart kubelet

. Allow new workload on node

kubectl uncordon <node-name>

. Exit machine

exit

Worker Node
. Install new kubeadm version

apt-get update && apt-get install -y kubeadm=<version>

. kubeadm upgrade node

kubeadm upgrade node

. Drain workload on node

kubectl drain <node-name> --ignore-daemonsets

. Upgrade kubelet and kubectl

apt-get update && apt-get install -y kubelet=<version> kubectl=


<version>

. Restart kubelet process

systemctl daemon-reload
systemctl restart kubelet

. Allow new workload on node


2/3
5. upgrade_containers.md 2025-08-20

kubectl uncordon <node-name>

. Exit

exit

3/3

You might also like