CKAD Application Deployment Practice Question
In a Deployment YAML, which field defines the number of pods to run?
⚠ Common exam trap
The CKAD exam often tests the confusion between `spec.replicas` (the correct field) and `spec.template.replicas` (which does not exist), leading candidates to incorrectly assume replicas are defined inside the Pod template.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
spec.replicas
In a Kubernetes Deployment YAML, the `spec.replicas` field directly specifies the desired number of Pod replicas that the Deployment controller should maintain. This field is part of the Deployment's specification and tells the controller to create or scale Pods to match the given count.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
spec.strategy.replicas
Why it's wrong here
spec.strategy.replicas is invalid because the Deployment's strategy field only configures how updates are performed, such as rolling updates with maxUnavailable or maxSurge. It contains no subfield named replicas, and the desired pod count is not part of the rollout strategy, so this path has no meaning in a Deployment manifest.
- ✗
spec.template.replicas
Why it's wrong here
spec.template.replicas is invalid because spec.template is the Pod template, which describes the pod's metadata and containers, not the number of instances. The template is a blueprint for each pod created by the Deployment, and replicas is not a recognized field inside a PodTemplateSpec, so this path would be rejected by the Kubernetes API.
- ✓
spec.replicas
Why this is correct
spec.replicas is the correct field because it lives directly under the Deployment's top-level spec and defines the desired number of running pod replicas. The Deployment controller ensures the current number of pods matches this value by creating or deleting ReplicaSets, and it is optional; if omitted, it defaults to 1.
- ✗
metadata.replicas
Why it's wrong here
metadata.replicas is invalid because the metadata section stores identifying information about the object, such as name, namespace, labels, and annotations. Replicas is a desired operational state that belongs in the spec, not metadata, so placing it there would be ignored or rejected by the API schema, and it would not affect pod count.
Go deeper
Related to this question
About these practice questions
Courseiva writes every CKAD question from scratch — 826 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CKAD practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKAD exam.