CertLumen

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 Warning header, the k8s.io/deprecated audit annotation and the apiserver_requested_deprecated_apis metric 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 needs pathType and service.name / service.port.
  • CronJob is batch/v1 (v1beta1 removed in v1.25); PodDisruptionBudget is policy/v1; HPA is autoscaling/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?

  1. Aapps/v1 requires a strategy block with type: RollingUpdate before it accepts any Deployment
  2. Bapps/v1 requires spec.selector matching the template labels; older versions defaulted it
  3. CThe replicas field is not allowed in apps/v1
  4. Dapps/v1 Deployments must be created in the kube-system namespace, 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.

More in this section

← Previous objective · All 24 objectives · Next objective →