Kubernetes / Advanced: extensibility, resilience, and lifecycle / Lesson 17
Cluster upgrades and API lifecycle
Plan version, API, plugin, and data compatibility together without treating an upgrade or rollback as one universal command.
On this page
Lesson goals
- Explain the model, assumptions, and boundaries of cluster upgrades and api lifecycle.
- Interpret both examples and distinguish declared intent from established evidence.
- Diagnose the listed failures and justify the worked recovery decisions without executing cluster operations.
Inventory the actual compatibility boundary
A cluster upgrade changes more than one server binary. API servers, node components, clients, controllers, admission webhooks, networking, CSI drivers, metrics adapters, and provider integrations can all have compatibility constraints. Record installed versions and required capabilities from approved inventory. Managed services and self-managed installations have different procedures and responsibilities. The first teaching checklist names evidence rather than installation commands. Do not infer support from a manifest parsing successfully or from a client version matching one server. Read the current release, version-skew, deprecation, and vendor policies for the exact proposed transition.
transition_review:
installed_versions: approved-inventory
target_versions: supported-platform-plan
api_consumers: audited-and-migrated
plugins_and_webhooks: compatibility-verified
restore_evidence: isolated-rehearsal-record
node_headroom: measured
completion: platform-plus-application-checks
This record is not an executable upgrade plan or a statement that compatibility has been measured. Each field names evidence required before authorization.
Find API consumers before removal
Stored manifests, running controllers, templates, scripts, and external clients can continue using deprecated APIs. An API migration can require changed fields or semantics rather than only replacing apiVersion. The second synthetic inventory separates a stable Deployment consumer from an unresolved custom webhook dependency. Admission and conversion webhooks can block unrelated requests when their availability or certificate assumptions fail. Confirm served and storage versions for custom resources and test conversion behavior. Preserve review evidence for every important consumer instead of assuming that a repository search finds all live or third-party traffic.
consumer API or dependency review state
booking Deployment apps/v1 schema checked locally
custom resource conversion webhook external compatibility unresolved
network implementation vendor-supported versions verify against target release
application database independent restore path test separately
Local schema review is narrower than provider or integration verification. Unresolved entries block a confident transition decision and must not be treated as passing results.
Verify backup and recovery scope
Control-plane state backup, provider configuration, certificates, encryption keys, and application persistent data have different recovery paths. An etcd snapshot is not a backup of every database or external volume. Protect sensitive cluster state and verify authorized restoration in an isolated setting. Decide what rollback means before starting: some transitions require provider-specific restore or forward repair rather than downgrading binaries. Reverting an application manifest does not reverse a control-plane upgrade. State acceptable loss, recovery time, decision authority, and the exact point at which the previous plan is no longer safe.
Sequence controlled change and maintenance
Use the documented supported order for the chosen distribution or managed platform and respect component version skew. Node replacement or maintenance affects capacity, disruption budgets, storage attachment, long-lived connections, and accepted work. Prepare sufficient headroom and application graceful termination. A blocked eviction deserves diagnosis rather than routine force. Upgrade representative nonproduction environments and validate required plugins and workloads before broader exposure. Avoid combining unrelated policy, image, and API changes in the same window because failure attribution becomes harder. No upgrade, drain, backup, node, provider, or administrative command is executed by this course.
Define evidence for completion
Check component health, API availability, scheduling, networking, storage, identity, admission, telemetry, and selected application journeys after each controlled stage. A reachable API does not prove data-plane compatibility. Compare user errors, latency, and pending work with a suitable baseline and keep a scoped abort decision available. Update inventory, runbooks, policy-version pins, and future removal dates after completion. Dated support information must be rechecked before the next change. A reliable lifecycle process combines current compatibility evidence with recoverability; it is not a promise that all stable APIs or every plugin behave identically across releases.
Common errors and fixes
Only apiVersion is changed during migration
- Why it happens
- Field and behavior changes were not reviewed.
- How to fix it
- Read the migration guide and verify the complete contract.
- Prevent it next time
- Inventory consumers and test semantics before removal.
An etcd copy is called a complete service backup
- Why it happens
- Cluster objects were confused with external persistent data.
- How to fix it
- Define independent data, key, and control-plane restoration.
- Prevent it next time
- Rehearse application recovery as well as API state.
Healthy control plane hides broken plugins
- Why it happens
- Completion omitted data-plane and workload checks.
- How to fix it
- Verify required networking, storage, admission, and user paths.
- Prevent it next time
- Use stage-specific acceptance and abort criteria.
Check your understanding
1. A newer API accepts the migrated manifest. What remains to establish compatibility?
Show worked solution
Verify controllers, admission, conversion, plugins, defaults, scheduling, runtime behavior, and the user contract. API acceptance covers one boundary only. Include nonrepository consumers and recovery evidence so a successful text migration does not hide a broken system integration.
2. Why must rollback planning precede the upgrade window?
Show worked solution
The supported recovery path may require snapshots, keys, provider preparation, and data compatibility that cannot be improvised after failure. Some transitions favor forward repair. Define authority, evidence, and limits before any irreversible step rather than assuming binary downgrade is safe.
Key takeaways
- A cluster upgrade changes more than one server binary.
- Control-plane state backup, provider configuration, certificates, encryption keys, and application persistent data have different recovery paths.
- Check component health, API availability, scheduling, networking, storage, identity, admission, telemetry, and selected application journeys after each controlled stage.