Video in progress
A Kubernetes cluster has to be upgraded by several minor versions every year. Which strategy do you choose: an in-place upgrade, or standing up a new cluster and migrating?
An in-place upgrade is cheap and fast, but it cannot be reverted and a control plane mistake hits the whole cluster. Migrating to a new cluster (a blue-green cluster) is safer and gives you a rollback, but it requires GitOps, external DNS and stateful workloads to be ready.
📖 Answer
Each Kubernetes minor version is supported for about a year, and you can jump only one minor version at a time. So upgrading is ongoing work, not a one-time project. Companies that put it off end up three versions behind and upgrade at great risk.
In-place: control plane first, then the node pools one by one (adding surge nodes and draining the old ones). On managed clusters this is one button.
- fast, and no extra cluster is needed;
- after the control plane is upgraded, going back is nearly impossible;
- the quality of your workloads gets tested: services with wrong PDBs, graceful shutdown or anti-affinity fail during the drain.
A new cluster: a cluster at version N+1 is brought up, loaded with the same state through GitOps, and traffic is moved gradually through DNS or a global load balancer.
- if there is a problem, traffic goes back to the old cluster;
- deprecated APIs and operator compatibility can be verified under real load;
- but: stateful workloads inside the cluster do not move, IP allowlists in external systems must be updated, and you pay for two clusters.
How to decide:
- stateless services and full GitOps: the new-cluster strategy is realistic and safe;
- lots of stateful things in the cluster: in-place, but with good preparation.
The preparation is the same for both: find deprecated APIs ahead of time (with tools such as kubent or pluto), check operator and CRD compatibility, upgrade the non-prod cluster first, and regularly test that services survive a drain.
For Java teams the most common problem is not the cluster but their own services: no PDB, no graceful shutdown, no startupProbe. A cluster upgrade exposes these first.
Sign up to mark studied questions and save your progress.