How to upgrade a Kubernetes cluster: kubeadm, EKS, AKS, and GKE without surprises
The version skew policy, one minor at a time, pre-checks (deprecated APIs, PodDisruptionBudgets, etcd snapshots), and the step-by-step upgrade on kubeadm, EKS, AKS, and GKE, with a comparison table.
Kubernetes$ kubeadm upgrade plan▍Kubernetes ships about three minor versions a year, and each one gets roughly a year of patches. The latest today is 1.37 (patch 1.37.2), and the versions the project supports are 1.35, 1.36, and 1.37. Teams that don’t plan upgrades end up doing them in a hurry, when support runs out or a CVE lands. The good news is that the process looks alike everywhere: only who runs each step changes. This guide covers the general rules, the pre-checks, and the flow on kubeadm, EKS, AKS, and GKE.
The rules that apply everywhere
The version skew policy defines which version combinations are supported:
| Component | Allowed difference from kube-apiserver |
|---|---|
| kube-apiserver in HA | Up to 1 minor between instances |
| kube-controller-manager, kube-scheduler, cloud-controller-manager | Up to 1 minor older, never newer |
| kubelet and kube-proxy | Up to 3 minors older, never newer |
| kubectl | 1 minor older or newer |
Three principles follow from these rules:
- Control plane first, nodes after. A kubelet must never be newer than the apiserver.
- One minor at a time. To go from 1.35 to 1.37, you pass through 1.36. Skipping minors is not supported.
- Latest patch first. Move to the latest patch of your current minor before you go up a minor.
The kubelet’s 3-minor slack exists to give you time to replace nodes calmly, not to leave them behind forever.
Before you upgrade: pre-checks
Deprecated and removed APIs
Each minor can remove APIs that were deprecated, and a manifest that uses one of them stops being accepted after the upgrade. Read the target version’s release notes and ask the apiserver itself what is still being called. On our lab cluster (kind, 1.37.0), the metric showed this:
kubectl get --raw /metrics | grep '^apiserver_requested_deprecated_apis'
apiserver_requested_deprecated_apis{group="",removed_release="",resource="endpoints",subresource="",version="v1"} 1
In other words, something called the Endpoints v1 API, which is deprecated in favor of EndpointSlice. Because removed_release is empty, no removal is scheduled. When that field holds a version, such as 1.38, it blocks the upgrade. The metric only sees what was called since the apiserver started. So complement it with a scan of the manifests in Git and of your charts. On EKS, upgrade insights do this analysis for you.
PodDisruptionBudgets
Every node upgrade starts with a drain, which uses the eviction API and respects PodDisruptionBudgets (PDBs). A well-configured PDB protects the application; a badly configured one stalls the upgrade. We tested both cases in the lab with a 3-replica Deployment:
kubectl -n apps create pdb web-pdb --selector=app=web --min-available=2
kubectl -n apps create pdb web-pdb-strict --selector=app=web --max-unavailable=0
kubectl -n apps get pdb
NAME MIN AVAILABLE MAX UNAVAILABLE ALLOWED DISRUPTIONS
web-pdb 2 N/A 1
web-pdb-strict N/A 0 0
Testing each PDB on its own: with minAvailable: 2, the first eviction went through ("code":201) and the PDB dropped to ALLOWED DISRUPTIONS 0 until the pod was recreated. With maxUnavailable: 0, the API refused right away: Error from server (TooManyRequests): Cannot evict pod as it would violate the pod's disruption budget. A kubectl drain would keep retrying forever. We also found that a pod covered by two PDBs can’t be evicted at all: the API answers that eviction doesn’t support more than one PDB per pod. Before the upgrade, run kubectl get pdb -A and look for ALLOWED DISRUPTIONS 0.
Backups and etcd snapshots
On managed clusters, etcd belongs to the provider, but your application state is yours: back up volumes and databases, and keep manifests versioned in Git. On kubeadm clusters, take an etcd snapshot on a control plane node before you start (more about etcd in what is etcd):
sudo 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-$(date +%F).db
kubeadm upgrade apply also keeps copies of the manifests and etcd data under /etc/kubernetes/tmp, but don’t rely on that alone. We didn’t run this snapshot in the lab, because etcd lives in kube-system, which we don’t touch in a shared environment.
kubeadm step by step
The pkgs.k8s.io repositories are split by minor. So the first step on every node is to replace v1.36 with v1.37 in the repository URL (if you installed with Terraform and cloud-init, see how to install Kubernetes with Terraform). Then:
# Repository for the new minor (on every node)
sudo sed -i 's/v1.36/v1.37/' /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update && apt-cache madison kubeadm # find the exact patch
# First control plane node
sudo apt-mark unhold kubeadm && sudo apt-get install -y kubeadm='1.37.2-*' && sudo apt-mark hold kubeadm
sudo kubeadm upgrade plan
sudo kubeadm upgrade apply v1.37.2
# Other control plane nodes and workers (instead of apply)
sudo kubeadm upgrade node
# kubelet and kubectl, one node at a time
kubectl drain <node> --ignore-daemonsets --delete-emptydir-data
sudo apt-mark unhold kubelet kubectl && sudo apt-get install -y kubelet='1.37.2-*' kubectl='1.37.2-*' && sudo apt-mark hold kubelet kubectl
sudo systemctl daemon-reload && sudo systemctl restart kubelet
kubectl uncordon <node>
upgrade plan shows the available versions and whether any component needs manual action. upgrade apply upgrades the control plane static pods, the local etcd, CoreDNS, and kube-proxy, and renews certificates by default. We checked these flags with --help on kubeadm v1.37. The drain is mandatory for a kubelet minor upgrade, because in-place minor upgrades are not supported.
EKS
On EKS, AWS upgrades the control plane and you handle the rest, in this order:
# 1. Insights: deprecated APIs in use, incompatible add-ons, etc.
aws eks list-insights --cluster-name my-cluster
# 2. Control plane (one minor at a time)
aws eks update-cluster-version --name my-cluster --kubernetes-version 1.37
aws eks describe-update --name my-cluster --update-id <id>
# 3. Add-ons: vpc-cni, coredns, kube-proxy, eks-pod-identity-agent
aws eks describe-addon-versions --kubernetes-version 1.37 --addon-name vpc-cni
aws eks update-addon --cluster-name my-cluster --addon-name vpc-cni \
--addon-version <version> --resolve-conflicts PRESERVE
# 4. Managed node groups (rolling, respecting PDBs)
aws eks update-nodegroup-version --cluster-name my-cluster \
--nodegroup-name ng1 --kubernetes-version 1.37
- Upgrade insights scan for deprecated API usage over a rolling 30-day window and refresh every 24 hours. Start there.
- EKS needs up to 5 free IP addresses in the cluster subnets for the control plane upgrade.
- Terraform: with the EKS v21 module, just change
kubernetes_versionand apply. Withmost_recent = true(the default), the add-ons follow. See how to install EKS with Terraform. - Karpenter: check the compatibility matrix first. According to the docs, 1.37 requires Karpenter 1.15.x. Upgrade the CRD chart (
karpenter-crd) first, thenkarpenter. Nodes are replaced through drift when the resolved AMI changes, rate-limited by the NodePool disruption budgets. - Auto Mode: after the control plane upgrade, AWS updates the nodes incrementally, respecting PDBs.
- Extended support: standard support lasts 14 months, and extended support adds 12 more at extra cost. Extended support is enabled by default; to turn it off, use
aws eks update-cluster-config --name my-cluster --upgrade-policy supportType=STANDARD. The current docs also let you roll back to the previous minor within 7 days of an upgrade. Check the conditions before you count on it.
AKS
az aks get-upgrades -g my-rg -n my-aks -o table
az aks upgrade -g my-rg -n my-aks --kubernetes-version <version> --control-plane-only
az aks nodepool upgrade -g my-rg --cluster-name my-aks -n pool1 --kubernetes-version <version>
az aks nodepool update -g my-rg --cluster-name my-aks -n pool1 --max-surge 33%
# Node image only (OS patches), without changing the Kubernetes version
az aks upgrade -g my-rg -n my-aks --node-image-only --yes
# Automation
az aks update -g my-rg -n my-aks --auto-upgrade-channel stable
az aks update -g my-rg -n my-aks --node-os-upgrade-channel NodeImage
- Without
--control-plane-only,az aks upgradeupgrades the control plane and every pool at once. Splitting the steps gives you more control. - Auto-upgrade channels:
none(default),patch,stable(latest patch of N-1),rapid, andnode-image(legacy). For the OS image, the channels areNone,Unmanaged,SecurityPatch, andNodeImage(default). - Combine the channels with planned maintenance (
az aks maintenanceconfiguration addwithaksManagedAutoUpgradeSchedule) so auto-upgrade only runs in the window you pick. - The default surge is 1 node; Microsoft recommends 33% for production. Pools can lag up to 3 minors behind the control plane.
- LTS: with the Premium tier, there is long-term support (about 2 years per version).
GKE
gcloud container get-server-config --location=us-central1
gcloud container clusters upgrade my-gke --master --cluster-version=<version> --location=us-central1
gcloud container clusters upgrade my-gke --node-pool=pool-1 --cluster-version=<version> --location=us-central1
gcloud container node-pools update pool-1 --cluster=my-gke --location=us-central1 \
--max-surge-upgrade=1 --max-unavailable-upgrade=0
- Release channels:
rapid,regular(default),stable, andextended(up to 24 months per minor; not available on Autopilot). On a channel, Google upgrades the control plane and nodes automatically. The “no channel” option is deprecated. - Maintenance windows and exclusions: set
--maintenance-window-start,--maintenance-window-end, and--maintenance-window-recurrenceonclusters updateto limit when automatic upgrades run. Use scoped exclusions (no_upgrades,no_minor_upgrades,no_minor_or_node_upgrades) to freeze critical periods. Exclusions don’t block manual upgrades. The duration limits change, so check the current docs. - Surge: the default is
maxSurge=1andmaxUnavailable=0. Standard clusters also offer blue-green (--enable-blue-green-upgrade), with soak time and rollback. - Autopilot: always on a channel; nodes are upgraded automatically, and only the control plane accepts a manual upgrade.
Comparison
| Aspect | kubeadm | EKS | AKS | GKE |
|---|---|---|---|---|
| Who upgrades the control plane | You (kubeadm upgrade apply) |
AWS, on your command | Azure, on command or by channel | Google, by channel or command |
| Automatic upgrade | No | Only at end of support | patch, stable, rapid channels |
Release channels |
| Nodes | drain + packages, node by node | Rolling node groups, Karpenter drift, Auto Mode | Surge per pool, node image | Surge or blue-green |
| Maintenance window | Yours | You decide when each step runs | Planned maintenance | Maintenance windows and exclusions |
| Long support | No | Extended support (+12 months) | LTS on the Premium tier | Extended channel (up to 24 months) |
Checklist
- Target version one minor above the current one, starting from the latest patch
- Release notes read and
apiserver_requested_deprecated_apis(or upgrade insights) showing no pending removals -
kubectl get pdb -Awith noALLOWED DISRUPTIONS 0and no pods under two PDBs - etcd snapshot (kubeadm) or volume and database backups (managed) tested
- Control plane first, then add-ons, then nodes
- Auto-upgrade channel and maintenance window set on purpose
- A routine to repeat the process for every new minor, before support ends
A Kubernetes upgrade isn’t an event, it’s a routine: teams that upgrade every minor do it in an afternoon, and teams that skip three versions live through a project.