KCNA Kubernetes Fundamentals Practice Question
A Deployment named 'myapp' is managing a ReplicaSet. You need to update the application image to version 2.0. What is the recommended approach?
⚠ Common exam trap
CNCF often tests the misconception that you must directly manipulate ReplicaSets or pods to update an application, when in fact the Deployment abstraction is designed to handle all updates through its pod template, and any direct changes to underlying resources are either reverted or break the declarative model.
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
✓
Update the Deployment's pod template image to version 2.0
The recommended approach to update a Deployment's application image is to modify the pod template in the Deployment specification. The Deployment controller then automatically performs a rolling update, creating a new ReplicaSet with the updated image and gradually scaling down the old ReplicaSet, ensuring zero-downtime updates and maintaining desired replica count.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Scale down the Deployment to 0 replicas, then scale up with the new image
Why it's wrong here
This would cause downtime and is not the recommended method.
- ✓
Update the Deployment's pod template image to version 2.0
Why this is correct
Updating the Deployment triggers a rolling update, ensuring zero-downtime and rollback capability.
- ✗
Delete the existing ReplicaSet and create a new one with the updated image
Why it's wrong here
This would cause downtime and bypass the Deployment's rolling update mechanism.
- ✗
Directly update the pods in the ReplicaSet by using 'kubectl edit pod'
Why it's wrong here
Pods are immutable; you cannot update their spec directly. Also, this would bypass the Deployment controller.
Go deeper
Related to this question
About these practice questions
This KCNA question is part of Courseiva's 833-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 →
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. You have a Deployment that manages 3 replicas of a web application. You want to perform a rolling update with zero downtime. Which kubectl command should you use?
medium- ✓ A.kubectl set image deployment/myapp mycontainer=myimage:v2
- B.kubectl delete pod myapp-xyz --grace-period=0
- C.kubectl patch deployment myapp -p '{"spec":{"replicas":5}}'
- D.kubectl rollout undo deployment/myapp
Why A: `kubectl set image deployment/myapp mycontainer=myimage:v2` triggers a rolling update on the Deployment, which by default creates a new ReplicaSet and gradually scales it up while scaling down the old ReplicaSet, ensuring zero downtime. The Deployment controller manages the update strategy (default: RollingUpdate) and maintains the desired number of replicas throughout the process.
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.