KCNA Kubernetes Fundamentals Practice Question
A Deployment manages ReplicaSets and supports rolling updates. You want to change the container image of a Deployment without downtime. What is the recommended approach?
⚠ Common exam trap
Watch out — candidates often confuse `kubectl expose` with updating images, or think that manually deleting pods will trigger the new image, when in fact the ReplicaSet only recreates pods based on its current template.
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
✓
Edit the Deployment's pod template spec to use the new image; the Deployment will automatically perform a rolling update
Editing the Deployment's pod template spec triggers an automatic rolling update, which is the recommended approach for zero-downtime updates. The Deployment controller creates a new ReplicaSet with the updated image and gradually scales it up while scaling down the old ReplicaSet, ensuring that a minimum number of pods remain available throughout the process.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use kubectl expose to update the image on the service
Why it's wrong here
kubectl expose creates a Service; it does not modify a Deployment's pod template, so the running image never changes. It is tempting because expose is used to publish workloads, and it would be correct when exposing a Deployment internally or externally for the first time.
- ✗
Delete the existing Deployment and create a new one with the updated image
Why it's wrong here
Deleting the Deployment destroys its ReplicaSets and pods, causing an outage before the replacement starts. It is tempting when a manifest is badly misconfigured, yet the rolling update triggered by editing the image preserves availability through controlled pod replacement.
- ✓
Edit the Deployment's pod template spec to use the new image; the Deployment will automatically perform a rolling update
Why this is correct
Updating the Deployment's pod template spec with the new image triggers the Deployment controller to create a new ReplicaSet and gradually scale it up while scaling the old one down, performing a rolling update that maintains availability without downtime.
- ✗
Manually delete all pods one by one; they will be recreated with the new image by the ReplicaSet
Why it's wrong here
Deleting pods manually bypasses the Deployment's rolling update mechanism, so the ReplicaSet recreates them from the current pod template — still the old image until you patch the Deployment spec. Editing the container image triggers a controlled rollout. Manual deletion suits one-off pod replacement, not image changes.
Go deeper
Related to this question
About these practice questions
This KCNA question is part of Courseiva's 930-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 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.