CKAD Application Deployment Practice Question
A Deployment has 3 replicas. You run 'kubectl scale deployment mydeploy --replicas=5'. What happens?
⚠ Common exam trap
Many candidates confuse scaling with rolling updates, assuming a new ReplicaSet is always created, but scaling only changes the replica count on the existing ReplicaSet unless the pod template is modified.
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` updates the Deployment's `spec.replicas` field to 5, which triggers the existing ReplicaSet to adjust its pod count. The ReplicaSet controller creates 2 additional pods to match the desired state, resulting in a total of 5 pods. The Deployment itself is not replaced, and no new ReplicaSet is created unless the pod template changes.
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 command fails because you must edit the YAML directly.
Why it's wrong here
kubectl scale is a first-class imperative command that directly patches the replicas field of the Deployment's scale subresource. It does not require editing YAML; the API server validates and applies the change immediately, making it a valid and common way to adjust replica counts. The command only fails if the resource doesn't exist or you specify an invalid count, not because YAML editing is mandatory.
- ✗
A new Deployment is created with 5 replicas.
Why it's wrong here
Scaling a Deployment does not create a new Deployment object; it mutates the existing resource in place. The Deployment's name, labels, selector, and pod template remain unchanged, so Kubernetes never allocates a new resource name or UID. The operation only updates the desired number of replicas in the existing Deployment's spec.
- ✓
The Deployment is updated to have 5 replicas, and the ReplicaSet creates 2 additional pods.
Why this is correct
When you run kubectl scale deployment demo --replicas=5, the Deployment's scale subresource is updated, and the Deployment controller reconciles by adjusting the desired replicas on the currently active ReplicaSet. Because the pod template is unchanged, no new ReplicaSet is created or replaced; the existing ReplicaSet's spec.replicas is set to 5, and its controller creates exactly two new pods to go from 3 to 5 running instances.
- ✗
The current ReplicaSet is deleted and a new one is created with 5 replicas.
Why it's wrong here
The active ReplicaSet is not deleted during scaling; instead, its .spec.replicas is updated to match the new desired count. Deleting and recreating a ReplicaSet happens only when the Deployment's pod template changes (e.g., a new image), which triggers a rolling update with a brand-new ReplicaSet. Scaling alone reuses the same ReplicaSet, preserving its pod history and labels.
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.