CKAD Application Deployment Practice Question
During a rolling update, you want to ensure that at most 2 pods are unavailable at any time. Which field should you set in the Deployment spec?
⚠ Common exam trap
It's easy for candidates to confuse `maxSurge` (which controls extra Pods created above the desired count) with `maxUnavailable` (which controls Pods that can be unavailable), leading candidates to incorrectly select `maxSurge` when the question asks about limiting unavailable Pods.
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.strategy.rollingUpdate.maxUnavailable: 2
`spec.strategy.rollingUpdate.maxUnavailable` specifies the maximum number of Pods that can be unavailable during a rolling update. Setting `maxUnavailable: 2` ensures that at most 2 Pods are unavailable at any time, allowing the update to proceed while maintaining the desired availability.
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.type: Recreate
Why it's wrong here
Setting spec.strategy.type to Recreate causes Kubernetes to delete all existing pods before creating any new ones during a deployment update. This means every pod is unavailable at once, which guarantees many more than 2 pods down and directly contradicts the availability constraint. Recreate is appropriate only when full downtime is acceptable, not when you need a bounded unavailability limit.
- ✗
spec.replicas: 2
Why it's wrong here
spec.replicas: 2 defines the desired steady-state number of pods for the Deployment, not a cap on how many may be missing during an update. Even with exactly 2 replicas, a rolling update that removes both old pods before starting new ones would make 2 unavailable, but that limit comes from the update strategy, not from the replica count. Replicas only sets the target scale; it has no effect on how the rolling update behaves.
- ✗
spec.strategy.rollingUpdate.maxSurge: 2
Why it's wrong here
spec.strategy.rollingUpdate.maxSurge: 2 sets the maximum number of pods that may be created above the desired replica count during the update. While a higher surge can indirectly help maintain availability by allowing new pods to come up before old ones are removed, it does not limit or specify how many pods may be unavailable at any moment. That unavailability cap is controlled exclusively by maxUnavailable, so maxSurge alone cannot satisfy the requirement.
- ✓
spec.strategy.rollingUpdate.maxUnavailable: 2
Why this is correct
spec.strategy.rollingUpdate.maxUnavailable: 2 directly caps the number of pods that may be unavailable during a rolling update, ensuring that at most 2 pods are down at any given time relative to the desired replica count. The Deployment controller uses this value to decide when it can scale down old ReplicaSets and scale up new ones, keeping the available pod count at desired minus 2. This is the exact setting needed for the stated requirement of allowing at most 2 replicas to be unavailable.
Go deeper
Related to this question
About these practice questions
This CKAD question is part of Courseiva's 160-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.