Sub topic 1
Why clusters must be upgraded regularly
Prerequisites
This chapter assumes you can run basic kubectl commands and read YAML manifests. You should know the core objects (Pods, Deployments, Services, Ingress, CronJobs) and the difference between control plane and worker nodes.
The release cadence
Kubernetes ships a new minor version (for example 1.30 to 1.31) about three times a year. Each minor version brings new features, bug fixes, and API changes. Between minor releases, the project publishes patch releases (1.31.1, 1.31.2) that carry only fixes and security updates.
The project maintains the three most recent minor versions. A minor version receives patches for about 14 months. After that, it gets no security fixes, even for serious vulnerabilities.
A cluster that stays on one version will eventually leave this window. Your only option is then a larger jump, and Kubernetes does not support skipping minor versions.
Why waiting costs more
Three problems grow the longer you wait.
- Security. Fixes land only in supported versions. An end-of-life cluster keeps every known vulnerability.
- Removed APIs. Old API versions are removed on a schedule. A manifest that works today can be rejected by a newer cluster. The next chapters cover how this works.
- Compatibility. Add-ons such as CNI plugins, ingress controllers, and CSI drivers declare which Kubernetes versions they support. Falling behind makes it harder to update them.
Upgrades must go one minor version at a time. If you are three versions behind, you need three full upgrade cycles. Each cycle is a chance for something to break, so frequent small upgrades are safer than rare large ones.
Check where you stand
Two commands show the current state. The first reads a metric from the API server that counts requests to deprecated APIs. The second lists the API versions the server serves.
# Show which deprecated APIs this API server has served requests for
kubectl get --raw /metrics | grep apiserver_requested_deprecated_apis
# List the API versions the server currently serves
kubectl api-versions | sortThe metric has group, version, resource, and removed_release labels. The removed_release label tells you in which version each deprecated API goes away.
What a regular upgrade routine looks like
Teams that upgrade well treat it as routine work. They follow a cycle for each minor version:
- Read the release notes for removals and behavior changes.
- Find deprecated API use in manifests and in the running cluster.
- Back up etcd and test the upgrade in a staging cluster.
- Upgrade the control plane, then the nodes.
- Verify, and keep a recovery path ready.
The remaining chapters follow this order.
Exercise
Your cluster runs a minor version that is two releases older than the newest one. Why is it risky to wait several more releases before upgrading?
Show answer
Patches stop once the version leaves the supported window, so security fixes no longer arrive. Each skipped release can also remove API versions your manifests use. Since minor versions cannot be skipped, you would need one upgrade per missed version, and each one adds risk.