KCNA Cloud Native Application Delivery Practice Question
A team is deploying a microservice application on Kubernetes. They want to ensure that during rolling updates, the new version of the service receives traffic only after the readiness probe succeeds. However, they observe that the old pods are terminated before the new pods are ready, causing a brief downtime. Which configuration change should they make to the Deployment to prevent this?
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
✓
Set spec.strategy.rollingUpdate.maxSurge=1 and maxUnavailable=0
Setting spec.strategy.rollingUpdate.maxSurge=1 and maxUnavailable=0 ensures that during a rolling update, new pods are created before old pods are terminated. This prevents downtime by maintaining the desired number of available pods at all times. Option B is incorrect because maxSurge=0 prevents creating new pods before terminating old ones, which can cause downtime if old pods are removed before new ones are ready. Option A is incorrect because minReadySeconds controls how long a pod must be ready before being considered available, not the order of creation/termination. Option C is incorrect because a liveness probe is for restarting unhealthy pods, not for controlling rollout behavior.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Set spec.strategy.rollingUpdate.minReadySeconds to 0
Why it's wrong here
Setting minReadySeconds to 0 speeds up rollout but does not change the order of pod creation/termination; it does not prevent downtime.
- ✗
Set spec.strategy.rollingUpdate.maxSurge=0 and maxUnavailable=1
Why it's wrong here
Setting maxSurge=0 and maxUnavailable=1 allows old pods to be terminated before new ones are created, which can cause downtime during the update.
- ✗
Add a liveness probe to the container spec
Why it's wrong here
A liveness probe checks container health but does not influence the rollout strategy or protect against downtime during updates.
- ✓
Set spec.strategy.rollingUpdate.maxSurge=1 and maxUnavailable=0
Why this is correct
Setting maxSurge=1 and maxUnavailable=0 ensures that at least one extra pod is created before any old pod is terminated, maintaining availability and preventing downtime.
Go deeper
Related to this question
About these practice questions
Courseiva writes every KCNA question from scratch — 833 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 →
Same concept, more angles
1 more way 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. An application deployment in Kubernetes uses a Deployment object. During a rolling update, the new ReplicaSet fails to become healthy. What is the default behavior of the Deployment controller?
medium- A.It continues the rollout, ignoring the health check failures
- B.It automatically rolls back to the previous revision
- C.It scales down the old ReplicaSet to zero
- ✓ D.It pauses the rollout and keeps the old ReplicaSet running
Why D: By default, the Deployment controller will stop the rollout if the new pods are unhealthy, and the old ReplicaSet remains running.
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.