KCNA Kubernetes Fundamentals Practice Question
You have a Deployment defined with replicas: 3. You run 'kubectl scale deployment my-deployment --replicas=5'. What happens?
⚠ Common exam trap
Many candidates confuse scaling with rolling updates, assuming that any change to a Deployment triggers a rollout, when in fact only changes to the Pod template (e.g., image, command) cause a new ReplicaSet to be created.
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
✓
The Deployment is updated to have 5 replicas, and the ReplicaSet creates 2 additional pods.
`kubectl scale` directly updates the `.spec.replicas` field of the Deployment, which in turn instructs the existing ReplicaSet to adjust its pod count. The ReplicaSet controller then creates 2 additional Pods to reach the desired 5 replicas, without recreating existing Pods or triggering a rollout.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The Deployment is updated to have 5 replicas, but existing pods are recreated to match.
Why it's wrong here
Scaling updates the replicas field and the controller adds two pods; the three existing pods are left untouched because their template is unchanged. It tempts because a Deployment rollout does recreate pods when the pod template changes, which is not what a replica-count change does.
- ✗
The command fails because you cannot scale a Deployment directly.
Why it's wrong here
Deployments are scaled directly; kubectl scale targets the Deployment's replicas field and the Deployment controller creates the additional pods. It tempts because scaling is also possible against a ReplicaSet or StatefulSet, leading some to assume Deployments must be scaled indirectly through a ReplicaSet rather than directly.
- ✗
The Deployment rolls out a new version with 5 replicas.
Why it's wrong here
Scaling alters only the replicas field of the existing Deployment; no new pod template is submitted, so no rollout occurs and existing pods persist. It tempts because changing a Deployment's spec can trigger a rollout when the template changes, which is the case for image or configuration updates, not replica counts.
- ✓
The Deployment is updated to have 5 replicas, and the ReplicaSet creates 2 additional pods.
Why this is correct
Scaling updates the Deployment's desired replica count to 5, and the Deployment controller propagates this to its ReplicaSet, which creates 2 additional pods to reach the target. This satisfies the stem's constraint that the change flows through the Deployment–ReplicaSet ownership hierarchy rather than acting on pods directly.
Go deeper
Related to this question
About these practice questions
Courseiva writes every KCNA question from scratch — 930 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 KCNA 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 KCNA exam.