Skip to main content
This guide walks through a rolling upgrade of a kubeadm-managed Kubernetes cluster, keeping applications available during the upgrade. The lab environment has two VMs: a control-plane and a single worker (node01). You cannot provision new VMs, and users must not be impacted — so we upgrade nodes one at a time, moving workloads as needed. Key terms: kubeadm upgrade, control-plane upgrade, kubelet upgrade, rolling upgrade, drain/cordon.

Inspect the cluster

Start by creating a short alias for kubectl and inspect nodes, node taints, and running workloads.
Confirm whether either node is tainted (which would prevent scheduling):
Both nodes are schedulable, so workloads may run on either node (including the control-plane). List deployments and pods to see how workloads are distributed:
Because the control-plane accepts workloads, we can safely perform a rolling upgrade: cordon and drain one node, upgrade it, bring it back online, then repeat the process for the other node.

Choose an upgrade strategy

Constraints:
  • No new VMs can be provisioned.
  • End users must not be impacted.
Recommended strategy:
  • Upgrade nodes one at a time.
  • Drain each node so pods can migrate to the remaining node.
  • Upgrade the control-plane first (kubeadm requires upgrading control-plane components before worker kubelets), then upgrade workers.
Note: If the control-plane is tainted and there is only a single worker, you may need extra capacity or a maintenance window. In this lab both nodes are schedulable, enabling a rolling upgrade.

Determine available upgrades with kubeadm

Run kubeadm upgrade plan on the control-plane to see supported target versions:
This output shows the local kubeadm (v1.19.0) can upgrade the cluster within the v1.19 patch series. To move to a newer minor series (for example 1.20.x), first install the target minor version of the kubeadm binary, then run kubeadm upgrade apply to upgrade control-plane components.
Always upgrade the kubeadm binary to the target minor version before running kubeadm upgrade apply. kubeadm will refuse to apply upgrades to minor versions newer than the kubeadm binary itself.

Select the target version and follow docs

For this lab we will upgrade from v1.19 to v1.20 (control-plane first, then worker). Follow the Kubernetes documentation for exact procedures and compatibility guidance:
A screenshot of the Kubernetes documentation page titled "Upgrading kubeadm clusters," showing upgrade instructions, version links, and a left navigation menu. A blue banner at the top notes the Dockershim removal for Kubernetes 1.24.
Identify your OS and available kubeadm packages (example shows Ubuntu 18.04). Pin package versions consistently across kubeadm, kubelet, and kubectl (e.g., 1.20.0-00 or 1.20.15-00 — be consistent).
Search apt cache for available kubeadm packages:

Upgrade plan (high-level checklist)

Upgrade the control-plane node (detailed)

  1. Drain and cordon the control-plane (evict non-DaemonSet pods).
  2. Upgrade kubeadm to the chosen 1.20.x-00 package.
  3. Run kubeadm upgrade apply v1.20.x.
  4. Upgrade kubelet and kubectl, restart kubelet.
  5. Uncordon the control-plane.
Example sequence and trimmed outputs:
  • Drain the control-plane (ignore DaemonSets like CNI and kube-proxy):
  • Upgrade the kubeadm binary (example installs 1.20.0-00). Use apt-mark to manage holds where appropriate:
If your apt supports --allow-change-held-packages, use that in a single command.
  • Verify version and run the plan, then apply the upgrade:
Success excerpt:
  • Upgrade kubelet and kubectl on the control-plane, restart kubelet, then uncordon:
At this point the control-plane components and control-plane kubelet are at v1.20.0.

Upgrade the worker node (node01)

Repeat the process on each worker, one node at a time. High-level worker steps:
  • Cordon and drain the worker from the control-plane: kubectl drain node01 --ignore-daemonsets.
  • SSH to the worker and upgrade kubeadm to the target package.
  • On the worker run sudo kubeadm upgrade node to update the node’s kubelet configuration.
  • Upgrade kubelet and kubectl on the worker, restart kubelet.
  • Exit worker SSH, then uncordon the worker from the control-plane.
Example control-plane drain and verification:
On node01 (worker) via SSH:
Back on the control-plane, uncordon node01 and verify both nodes are Ready on v1.20.0:
Workloads are rescheduled automatically according to Deployment settings and Pod Disruption Budgets (PDBs), if present.

Final notes and recommendations

Before upgrading control-plane and kubelets, confirm that addons (CNI plugin, CoreDNS, kube-proxy, etc.) are compatible with the target Kubernetes version. Always take etcd/cluster backups and test the upgrade path in a non-production environment first.
Best practices:
  • Read the Kubernetes documentation: Upgrading kubeadm clusters — https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/
  • Upgrade one node at a time and verify cluster health between steps: kubectl get nodes, kubectl get cs, kubectl get pods -A.
  • Ensure package versions are consistent across kubeadm, kubelet, and kubectl.
  • If control-plane nodes are tainted (unschedulable) or you have a single worker with strict availability needs, plan for additional capacity or schedule a maintenance window.
You have completed a rolling upgrade from v1.19.0 to v1.20.0 for both control-plane and worker node while keeping workloads available.

References

Watch Video