KCNA Kubernetes Fundamentals Practice Question
A Deployment is configured with 'replicas: 4' and 'strategy.type: RollingUpdate'. You update the container image. What behavior does the Deployment exhibit?
⚠ Common exam trap
Many candidates confuse RollingUpdate with Recreate (Option B) or assume all Pods are replaced simultaneously (Option A), failing to recognize the incremental, surge-based behavior controlled by maxSurge and maxUnavailable defaults.
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
✓
New Pods are created before old ones are terminated, one at a time
With a RollingUpdate strategy, the Deployment controller replaces old Pods with new ones incrementally to ensure zero downtime. By default, it creates new Pods before terminating old ones (maxSurge=25%, maxUnavailable=25%), so one new Pod is created first, then one old Pod is terminated, repeating until all 4 Pods run the new image.
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 creates 8 Pods total, 4 old and 4 new
Why it's wrong here
The number of Pods does not double; the Deployment manages the transition.
- ✗
All 4 Pods are deleted immediately and then 4 new Pods are created
Why it's wrong here
That describes a Recreate strategy.
- ✓
New Pods are created before old ones are terminated, one at a time
Why this is correct
RollingUpdate replaces Pods incrementally.
- ✗
The update is paused until manually resumed
Why it's wrong here
Pausing is a separate action; by default the update proceeds.
Go deeper
Related to this question
About these practice questions
One of 833 original KCNA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
4 more ways this is tested on KCNA
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A Deployment named 'web-app' is configured with replicas: 3. You update the container image. Which Kubernetes object directly manages the pods during the rolling update?
medium- A.StatefulSet
- B.DaemonSet
- C.Job
- ✓ D.ReplicaSet
Why D: When a Deployment is updated (e.g., container image change), it creates a new ReplicaSet to manage the new pods and scales down the old ReplicaSet. The ReplicaSet is the Kubernetes object that directly owns and manages the pods during the rolling update, ensuring the desired number of replicas are running at each step.
Variation 2. A Deployment named 'app-deploy' is configured with strategy type: RollingUpdate. You want to update the container image to a new version. What kubectl command should you use?
medium- A.kubectl apply -f updated-deployment.yaml
- B.kubectl edit deployment app-deploy
- C.kubectl patch deployment app-deploy -p '{"spec":{"template":{"spec":{"containers":[{"name":"app","image":"new:tag"}]}}}}'
- ✓ D.kubectl set image deployment/app-deploy app=new:tag
Why D: `kubectl set image` is the dedicated command for updating the container image of an existing deployment without modifying other fields. It directly modifies the deployment's pod template spec to use the new image, triggering a rolling update as defined by the deployment's strategy type.
Variation 3. A Deployment is configured with 'replicas: 5' and a rolling update strategy. During an update, you notice that the number of available pods drops to 3 momentarily. Which field in the Deployment spec can be adjusted to control the minimum number of pods available during a rolling update?
hard- A.spec.strategy.rollingUpdate.maxSurge
- ✓ B.spec.strategy.rollingUpdate.maxUnavailable
- C.spec.minReadySeconds
- D.spec.replicas
Why B: `spec.strategy.rollingUpdate.maxUnavailable` defines the maximum number (or percentage) of Pods that can be unavailable during a rolling update. With `replicas: 5`, setting `maxUnavailable: 2` would allow at most 2 Pods to be unavailable at any time, ensuring that at least 3 Pods remain available — which matches the observed drop to 3. This field directly controls the minimum number of available Pods during the update process.
Variation 4. A Deployment is configured with 'strategy.type: RollingUpdate' and 'strategy.rollingUpdate.maxUnavailable: 0'. What is the effect during a rolling update?
hard- A.The update will fail because maxUnavailable must be at least 1
- B.The update will not proceed until at least one new pod is ready
- C.The update will proceed without any downtime
- ✓ D.No pod will be terminated until a new pod is ready
Why D: Setting `maxUnavailable: 0` means the Deployment controller will not terminate any existing pod until a new pod is fully ready. This ensures zero disruption to the application during the rolling update, as the controller waits for the new pod to pass its readiness probe before scaling down the old ReplicaSet.
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.