Certified Kubernetes Application Developer (CKAD) · Section 3 · 15% of the exam
Understand API depreciations
One of the objectives of the Certified Kubernetes Application Developer (CKAD) exam, in the section “Application Observability and Maintenance”. Here is what it covers, the points to remember and a question to try.
What it covers
Kubernetes APIs move through alpha, beta and GA, and old versions are eventually removed. This lesson shows how to read the deprecation policy, spot a manifest that uses a removed apiVersion, find the replacement and update your YAML before an upgrade breaks it.
Points to remember
- Alpha may vanish at any time, beta lives roughly 9 months or 3 releases before deprecation and the same again before removal, GA is not removed within a major version.
- The
Warningheader, thek8s.io/deprecatedaudit annotation and theapiserver_requested_deprecated_apismetric reveal deprecated use. - Deployment, DaemonSet, ReplicaSet and StatefulSet are
apps/v1(older versions removed in v1.16). - Ingress is
networking.k8s.io/v1(v1beta1 removed in v1.22) and needspathTypeandservice.name/service.port. - CronJob is
batch/v1(v1beta1 removed in v1.25); PodDisruptionBudget ispolicy/v1; HPA isautoscaling/v2.
Try a question
An application team owns a Deployment manifest with apiVersion: extensions/v1beta1. On a v1.37 cluster the apply fails. After changing the apiVersion to apps/v1, the apply fails again with missing required field "selector". Why?
- A
apps/v1requires astrategyblock withtype: RollingUpdatebefore it accepts any Deployment - B
apps/v1requiresspec.selectormatching the template labels; older versions defaulted it - CThe
replicasfield is not allowed inapps/v1 - D
apps/v1Deployments must be created in thekube-systemnamespace, where the controller manager watches them
Show the answer
B. In extensions/v1beta1 and apps/v1beta1 the selector defaulted from the template labels. apps/v1 makes spec.selector required and immutable, so write selector.matchLabels matching the template labels.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson API Versions and Deprecations teaches this objective (about 30 minutes), and 11 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.