Kubernetes interview question · Most asked

How do you upgrade a Kubernetes cluster safely?

Summary

Upgrade one minor version at a time: check deprecated and removed APIs first, upgrade the control plane, then add-ons (CNI, CoreDNS, kube-proxy, CSI drivers, ingress), then nodes, by replacing or draining them in batches while PodDisruptionBudgets keep apps available.

Longer Answer

Preparation: read the changelog, find removed APIs in your manifests and Helm charts (tools such as pluto or kubent), confirm add-on compatibility, and test in a non-production cluster. Version skew rules allow kubelets to be a few minor versions behind the API server but never ahead.

Node upgrades: prefer creating new node groups and moving workloads (blue/green nodes) over in-place upgrades; make sure workloads have multiple replicas, PDBs and graceful shutdown. Kubernetes minor versions are supported for roughly a year, so upgrades are a regular, planned activity rather than a rare event.

Key Points

  • One minor version at a time.
  • Find removed APIs first.
  • Control plane, add-ons, then nodes.
  • PDBs, replicas, graceful shutdown; plan regular upgrades.

More most-asked Kubernetes questions

← All Kubernetes questions