Upgrading a cluster
Keeping up with three releases a year: the support window, skew rules, finding removed APIs first, then control plane, add-ons and nodes in order, with drains.
Releases, version skew and feature gatesDisruptions, drains and PodDisruptionBudgetsThe control plane
Upgrading a cluster
The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.
Not started
What you'll learn
- Kubernetes ships about three minor releases a year and patches each for roughly 14 months, so a cluster that isn't upgraded falls out of support within a year and a half. Upgrade one minor version at a time.
- Version skew sets the order: API servers first (within one minor of each other), then controller manager and scheduler, then kubelets, which may lag the API server by up to three minors but never lead it.
- Before upgrading, find uses of deprecated and removed APIs: read the release notes, check the apiserver_requested_deprecated_apis metric and audit annotations, and scan manifests and Helm releases.
- Upgrade add-ons (CNI, CoreDNS, CSI drivers, ingress or Gateway controllers, operators) to versions that support the new minor, often before the control plane.
- Nodes are upgraded by cordon, drain, upgrade or replace, uncordon, a few at a time. Drains go through the eviction API, so PodDisruptionBudgets can and will block them.
- Rehearse on a staging cluster, back up etcd before the control plane step, and on managed services use surge node pools or blue-green node groups instead of in-place node changes.
Standing still is the riskiest option
Kubernetes releases a new minor version roughly every four months, and each gets about a year of patches plus a two-month maintenance tail. A cluster installed today and left alone falls out of support in a year and a half. Then it misses security fixes, managed providers start charging for extended support or force the upgrade, and the eventual jump spans several versions with several sets of removed APIs at once.
The releases and version skew lesson explained the rules. This one is about doing it: in order, with the checks that catch problems before they become outages. The habit that matters most is small and regular. One minor at a time, every release or two.
Skew decides the order
Components may run different versions, within limits. From the version skew policy, for an API server at 1.37:
- kube-apiserver: in an HA control plane, all instances within one minor of each other (1.36 and 1.37 during the upgrade).
- kube-controller-manager, kube-scheduler, cloud-controller-manager: not newer than the API servers, and at most one minor older.
- kubelet and kube-proxy: not newer than the API server, and up to three minors older (1.34 to 1.37).
- kubectl: within one minor either side.
So the sequence is fixed: API servers, then controller manager and scheduler, then kubelets. You can’t skip minors on the control plane. 1.35 to 1.37 is two upgrades. Kubelets can lag, so a node fleet can be upgraded in a later window, and replacement nodes can jump two minors at once.
Step 0: find what will break
Most upgrade outages aren’t Kubernetes failing. They’re a client using an API the new release removed, or an add-on that doesn’t support the new version.
Removed APIs. The API server counts every request to a deprecated API. On the lab v1.37.3 server, after one kubectl get endpoints:
$ kubectl -n shop get endpoints
Warning: v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice
$ kubectl get --raw /metrics | grep ^apiserver_requested_deprecated_apis
apiserver_requested_deprecated_apis{group="",removed_release="",resource="endpoints",subresource="",version="v1"} 1
removed_release is empty here. v1 Endpoints is deprecated but has no removal scheduled. For APIs that are scheduled, the label names the release that removes them, which is exactly the query to run before upgrading. Audit events for these requests carry k8s.io/deprecated and k8s.io/removed-release annotations with the caller’s identity, so you know which controller or pipeline to fix. Static scanners (Pluto, kubent) check manifests, Helm charts and rendered releases too. Objects already stored in etcd are converted by the API server automatically. The risk is clients, CI templates and charts that still send the old version.
Release notes. Read the “Urgent Upgrade Notes” and deprecation sections for every minor you cross, and check feature gates you rely on.
Add-ons. Check each component’s compatibility matrix against the target version: CNI plugin, CoreDNS, kube-proxy, CSI drivers, the ingress or Gateway controller, cert-manager, operators, the metrics stack. Upgrade those that need it first if they support both versions.
Step 1: the control plane
On a managed service this is one action, and the provider upgrades the API servers behind a stable endpoint. With kubeadm, from its docs and not run here:
# first control-plane node
apt-get install -y kubeadm=1.37.3-* # after switching the package repo to v1.37
kubeadm upgrade plan
kubeadm upgrade apply v1.37.3
# other control-plane nodes
kubeadm upgrade node
# then on each control-plane node: upgrade kubelet and kubectl, restart kubelet
kubeadm upgrade plan checks the cluster and prints what will change. apply renews certificates, rewrites the static Pod manifests for the API server, controller manager and scheduler, and upgrades etcd if needed. Take an etcd backup first. Downgrading a control plane is not a supported path, so restore is the rollback.
Step 2: nodes, a few at a time
Every node goes through cordon, drain, upgrade, uncordon. Cordon is quick:
$ kubectl drain fake-1 --ignore-daemonsets --delete-emptydir-data --timeout=20s
node/fake-1 cordoned
The node became unschedulable with the node.kubernetes.io/unschedulable:NoSchedule taint. Draining is where upgrades stall. On the lab cluster, the first attempt refused outright:
error: unable to drain node "fake-1" due to error: cannot delete Pods that declare no controller (use --force to override): prod/api, prod/plain
Bare Pods have nothing to recreate them, so drain won’t evict them without --force. After they were gone, a two-replica Deployment with a minAvailable: 2 PodDisruptionBudget blocked it:
error when evicting pods/"pay-6569478566-vdgt6" -n "shop" (will retry after 5s): Cannot evict pod as it would violate the pod's disruption budget.
That’s the PDB doing its job. A budget with zero allowed disruptions blocks drains forever. Find those before the window (kubectl get pdb -A, look for ALLOWED DISRUPTIONS 0). The other drain errors in that run were Pods “context deadline exceeded” waiting to terminate, because no kubelet was there to stop them. On a real node, long terminationGracePeriodSeconds and stuck finalizers have the same effect.
After the drain, upgrade the kubelet and runtime in place, or better, replace the node: add nodes with the new version (surge), drain the old ones, delete them. Managed node groups, Karpenter’s drift replacement and Cluster API all work this way. It also keeps OS patching and kubelet upgrades in one motion.
Step 3: after
- Check nodes
Ready, system Pods healthy, and no new warning events. - Watch error rates and API server latency through the metrics dashboards. Alpha metrics may have been renamed.
- Re-enable anything you paused (GitOps auto-sync, autoscalers).
- Record what surprised you in the runbook for next time.
About the video
The embed is Valaxy Technologies’ “Kubernetes Upgrade 1.34 to 1.35 | Upgrade Control Plane, Nodes & Add-ons”, August 2026, 24 minutes. Its chapters cover upgrade fundamentals, analysing the existing infrastructure, planning the strategy, executing the upgrade, handling failures, and reviewing release notes. The version hop is two releases behind this lesson’s lab, but the procedure is the same. I judged it from chapters and description only, since transcripts couldn’t be fetched. English was judged from its “English (US) original” audio track. Virtual Elephant’s video in deeper does a three-controller kubeadm upgrade command by command.
What was run: the deprecation warning and metric, the cordon, both drain refusals and the PDB retries are real output from a local Kubernetes v1.37.3 control plane whose nodes run no containers. No upgrade was performed, since there is one version of the binaries and no kubeadm. The skew rules are from the version skew policy, the support periods from the patch-release page, and the kubeadm steps from its upgrade guide, checked 2026-11-29.
Where this fits
An upgrade’s rollback plan is a backup. Next: backup and disaster recovery.
Check yourself
Your API server is 1.37. Which kubelet versions are supported, and can you run a 1.38 kubelet yet?
Kubelets from 1.34 to 1.37. A kubelet must never be newer than the API server, so 1.38 kubelets wait until every API server is on 1.38.
Why upgrade the API servers before the controller manager and scheduler?
The controller manager and scheduler talk to the API server and may be at most one minor older than it, never newer. Upgrading the API servers first keeps every client at or behind the server, so new API fields and versions exist before anything tries to use them.
kubectl drain has been retrying for ten minutes with 'Cannot evict pod as it would violate the pod's disruption budget'. What's going on?
A PodDisruptionBudget allows zero disruptions, for example minAvailable equal to the replica count, or replicas are already unhealthy. The eviction API refuses until the PDB allows it. Scale up, fix the unhealthy replicas, or relax the PDB, rather than forcing the drain.
How can you tell, before upgrading, whether anything still calls an API version the next release removes?
Check the API server's apiserver_requested_deprecated_apis metric, which counts requests per deprecated group, version and resource with the removal release. Audit events carry k8s.io/deprecated annotations naming the caller. Scan manifests, charts and rendered Helm releases too, since stored objects aren't the problem, clients are.
Go deeper
Notes
Notes are saved to your account.
Everything else on this page works without one — progress and bookmarks keep themselves in this browser and come with you when you sign in. Notes are the one thing worth not trusting to a browser you might clear.
Your notes could not be loaded.