Free ops runbook · Kubernetes

Kubernetes deprecations: find the API you still call before the cluster removes it

An API is deprecated in one release and removed a few releases later. The upgrade succeeds, the apply stops working, and the error points at a manifest you forgot you had. This page is the read-only inventory and the rollback path.

Deprecation is not removal

A deprecated API still serves requests. Removal is the release where it returns 404/410. Treat the deprecation notice as the deadline, not the incident.

Three places to look

Manifests in Git, controllers/operators that call the API, and clients (kubectl plugins, CI jobs, client-go versions).

404 vs 410

404 usually means wrong resource or version; 410 Gone means the API version existed and was removed. Both surface after an upgrade.

Test on a copy

Upgrade a staging cluster with the same CRDs and controllers. A manifest that applies is not a controller that reconciles.

Detect

Read-only inventory

CommandWhat it finds
kubectl api-resources --verbs=list -o nameResources the current cluster serves; compare across versions.
kubectl get --raw /metrics | grep apiserver_request_totalWhich API groups and versions are actually being called.
pluto detect-all-in-cluster or kubentDeprecated/removed API usage in live objects and Helm releases.
grep -R "apiVersion:" deploy/Manifests in Git that will be applied after the upgrade.
Audit logs are the source of truth
A manifest in Git may never be applied; a controller may call an API you never wrote. Turn on audit logging before the upgrade window.
Failure modes

What breaks after the upgrade

Manifest no longer maps

error: resource mapping not found ... no matches for kind "X" in version "Y" — the object is fine, the apiVersion is gone.

Controller crash loop

The operator still uses a removed client version and fails on reconcile or leader election.

Helm release drift

The chart renders an old apiVersion; upgrade fails halfway and the release is stuck.

Admission webhook order

A webhook or CRD that depended on the removed API is not ready when the new objects arrive.

Rollback

Keep the old cluster reachable

Do not delete the previous control plane until the new one has served traffic for 24 hours. If the upgrade fails, restore etcd and the previous version, then fix the manifest/controller before retrying. A rollback that loses the API objects is not a rollback.

Keep going

This page is free. The paid runbooks cover the operational failures around it, with detection commands, five failure modes and a migration checklist.