Finding Deprecated API Versions
"Understand API deprecations" is a CKAD objective and it shows up as a manifest that used to work and now does not. Kubernetes removes APIs on a published schedule, and the failure is a specific error at apply time - not a warning, not a partial success. Three removed versions are attempted here, the current ones are found from the cluster itself, and the API server's own deprecation metric is read.
Observability and Maintenance Guide 44 of 44 Intermediate
- Kubernetes1.36.4
- Cluster4 nodes
- Runtimecontainerd 2.2.6
- CNICalico v3.32.1
- TimeAbout 14 min
Deprecated and removed are different states. A deprecated API still works and returns a warning header; a removed one does not exist and kubectl cannot even map the kind. The three tried below - extensions/v1beta1 Ingress, policy/v1beta1 PodDisruptionBudget and batch/v1beta1 CronJob - were all removed some releases ago and are the ones most likely to be in an old manifest.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| CKA1001 | 192.168.0.175 | Ubuntu 26.04 LTS | Control Plane Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE01 | 192.168.0.176 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE02 | 192.168.0.177 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE03 | 192.168.0.178 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when a manifest that used to apply now fails. This matters because deprecated and removed are two different states - and the authoritative list of what your server accepts is one command rather than a changelog.
- listing what this API server actually serves with
kubectl api-versions - applying three manifests with removed apiVersions and reading the identical failure each time
- finding the version that does exist with
kubectl explain - reading the API server's own metrics for deprecated calls it has been asked to serve
Before you start
- A cluster and kubectl.
- The session creates namespace
ckad-dep, attempts three manifests on removed API versions, and reads the API server's metrics endpoint.
-
What this server actually serves
-
An apiVersion that is gone
-
Finding the version that does exist
-
What the server records about deprecated calls