Skip to content

Upgrading a Kubernetes cluster — kubeadm one-minor walkthrough

Upgrade a kubeadm cluster one minor at a time — kubeadm plan, control-plane first, worker drain/cordon, version skew, and the API deprecation checks you do beforehand.

Upgrading Kubernetes is the single most consequential maintenance you do — one minor version at a time, control plane first, workers second, with PodDisruptionBudgets honoured and a tested rollback plan. This article is the runbook for a kubeadm cluster: the pre-upgrade audit, the order of operations, the version-skew rules to respect, and the post-upgrade verification. The same shape applies to managed Kubernetes (EKS/GKE/AKS), with the cloud taking care of the kubelet/control-plane mechanics.

How to verify

Where you are before starting:

kubectl version --short
kubectl get nodes -o wide
kubeadm version
kubeadm upgrade plan

kubectl version shows client and server versions. get nodes shows each node’s kubelet version (the VERSION column). kubeadm upgrade plan (run on a control-plane node) tells you what upgrade paths are available and what changes between them.

Audit for deprecated APIs that the next minor removes:

kubectl get apiservices | grep -i deprecated
# better: install kubent (Kube no Trouble) or pluto:
kubent --target-version=v1.30

What’s happening

Each Kubernetes minor release deprecates and removes APIs on a schedule. The kubelet has a strict version skew rule: it can be at most one minor older than the control plane (e.g. control plane v1.30, kubelets v1.29 or v1.30, never v1.28 or v1.31). kubeadm enforces this — upgrade apply first upgrades the control plane components (api-server, controller-manager, scheduler, etcd, kube-proxy), then the operator manually upgrades the kubelet on each node.

The upgrade procedure has six concrete steps per control-plane node and per worker: install the new kubeadm binary, run kubeadm upgrade apply (first control-plane only) or kubeadm upgrade node (subsequent), drain the node, install the new kubelet and kubectl, restart the kubelet, uncordon. Drain triggers Pod evictions respecting PodDisruptionBudgets — a single-replica Deployment with a PDB requiring 1 minReplicas will block drain until you intervene.

The order matters: control plane first, workers second. The reverse is unsupported. Within control plane, the first node runs upgrade apply; the rest run upgrade node. Within workers, the order is your choice — usually one at a time with kubectl drain doing the orchestration.

The pre-upgrade audit is the most important step. Tools like kubent, pluto, and kube-no-trouble scan running objects for APIs that will be removed in the target version. Fix those before the upgrade, not during.

The procedure

  1. Pre-upgrade audit. Identify deprecated API usage and any orphaned workloads:

    kubent --target-version=v1.30 --context=prod
    kubectl get deploy -A --no-headers | wc -l
    kubectl get pdb -A
  2. Back up etcd before touching anything. On a control-plane node:

    sudo ETCDCTL_API=3 etcdctl \
      --endpoints=https://127.0.0.1:2379 \
      --cacert=/etc/kubernetes/pki/etcd/ca.crt \
      --cert=/etc/kubernetes/pki/etcd/server.crt \
      --key=/etc/kubernetes/pki/etcd/server.key \
      snapshot save /var/backups/etcd-pre-1.30.db
  3. On the first control-plane node, install the new kubeadm (matching the target minor):

    sudo apt-mark unhold kubeadm
    sudo apt-get update
    sudo apt-get install -y kubeadm=1.30.2-1.1
    sudo apt-mark hold kubeadm
    kubeadm version
    kubeadm upgrade plan
    sudo kubeadm upgrade apply v1.30.2
  4. Upgrade kubelet and kubectl on that node, drain, restart, uncordon:

    kubectl drain cp-1 --ignore-daemonsets --delete-emptydir-data --timeout=10m
    sudo apt-mark unhold kubelet kubectl
    sudo apt-get install -y kubelet=1.30.2-1.1 kubectl=1.30.2-1.1
    sudo apt-mark hold kubelet kubectl
    sudo systemctl daemon-reload
    sudo systemctl restart kubelet
    kubectl uncordon cp-1
  5. Other control-plane nodes: kubeadm upgrade node (not apply), then the same drain/upgrade kubelet/uncordon cycle.

    sudo kubeadm upgrade node
    kubectl drain cp-2 --ignore-daemonsets --delete-emptydir-data
    # install kubelet/kubectl, restart kubelet, uncordon
  6. Workers, one at a time. This is where PDBs and DaemonSets get exercised — drain may take minutes:

    kubectl drain worker-3 --ignore-daemonsets --delete-emptydir-data --timeout=15m
    ssh worker-3 'sudo apt-get install -y kubeadm=1.30.2-1.1 && sudo kubeadm upgrade node \
      && sudo apt-get install -y kubelet=1.30.2-1.1 kubectl=1.30.2-1.1 \
      && sudo systemctl restart kubelet'
    kubectl uncordon worker-3
  7. Verify every node is at the new version, workloads are healthy, and key Deployments still respond:

    kubectl get nodes -o wide
    kubectl get pods -A | grep -v Running | head
    kubectl rollout status -n team-payments deploy/web

Common pitfalls

  • Skipping minor versions is unsupported — kubeadm blocks apply v1.31 from a v1.29 cluster; upgrade to v1.30 first.
  • A drain that hangs is almost always a PDB blocking eviction or a Pod with no controller (bare Pod) — kubectl get pdb -A and kubectl get pods -o wide find them.
  • An out-of-date CNI gets left behind by kubeadm upgrade — Calico, Cilium, and friends have their own upgrade docs that need to run separately.
  • Deprecated APIs that work fine on v1.29 (e.g. policy/v1beta1 PDBs in old clusters) will fail to load on v1.30 — leave workloads using them stranded; the kubectl convert subcommand helps before the upgrade.
  • Cloud-controller-manager and external-dns versions need to match the cluster minor — upgrading the cluster without bumping these can break Service of type LoadBalancer reconciliation.

We operate cluster upgrades for clients on a one-minor-per-month cadence, audited with kubent ahead of each upgrade, PDBs reviewed for drainability, and rollback-ready etcd snapshots taken before each control-plane touch. See /en/services/managed-operations/.