Kubernetes Version Upgrade Workflow
Check deprecated APIs in use, drain and upgrade nodes in controlled batches, verify workloads reschedule, and stay within supported version skew.
Objective
Upgrade a Kubernetes cluster by one minor version without workloads failing on removed APIs.
Environment
- A cluster to upgrade
- A deprecation and API inventory tool
Steps
1. Scan for use of APIs removed
Scan for use of APIs removed or deprecated in the target version.
Expected state: Removed APIs are migrated before the upgrade.
2. Upgrade the control plane and confirm
Upgrade the control plane and confirm the API server is healthy.
Expected state: Control plane leads the upgrade.
3. Drain and upgrade nodes in batches,
Drain and upgrade nodes in batches, verifying rescheduling.
Expected state: Workloads move smoothly between nodes.
4. Keep the cluster within supported version
Keep the cluster within supported version skew until it converges.
Expected state: Components stay compatible during the transition.
Decision points
One minor at a time or skip?
- One minor at a time
- Skip minors
One minor at a time; skipping crosses removed APIs and skew limits.
Upgrade or replace the node pool?
- Upgrade in place
- Blue/green node pool
Blue/green pool for critical clusters; in-place for simpler ones with good draining.
Expected outcome
The cluster runs the target version with no workload failures from removed APIs and all nodes upgraded.
Verification
Confirm no deprecated API requests appear in the audit log and that all nodes report the target version with workloads healthy.
Cleanup
Remove any temporary version pins and record the upgrade.
Overview
Upgrade a Kubernetes cluster by one minor version without workloads failing on removed APIs. Confirm no deprecated API requests appear in the audit log and that all nodes report the target version with workloads healthy.
Steps
- Scan for use of APIs removed or deprecated in the target version. Expected state: Removed APIs are migrated before the upgrade.
- Upgrade the control plane and confirm the API server is healthy. Expected state: Control plane leads the upgrade.
- Drain and upgrade nodes in batches, verifying rescheduling. Expected state: Workloads move smoothly between nodes.
- Keep the cluster within supported version skew until it converges. Expected state: Components stay compatible during the transition.
pluto detect-all-in-cluster
# migrate removed APIs, then
kubeadm upgrade apply v1.31.0
kubectl drain node-1 --ignore-daemonsets --delete-emptydir-data
Verification
- The cluster runs the target version with no workload failures from removed APIs and all nodes upgraded.
Decision points
- One minor at a time or skip? Options: One minor at a time; Skip minors. Recommended: One minor at a time; skipping crosses removed APIs and skew limits.
- Upgrade or replace the node pool? Options: Upgrade in place; Blue/green node pool. Recommended: Blue/green pool for critical clusters; in-place for simpler ones with good draining.