CKAD Application Deployment Practice Question
You want to perform a canary deployment of a new version of your application. You create a Deployment named 'app-canary' with 1 replica and label 'version: canary'. The existing stable Deployment 'app-stable' has 3 replicas and label 'version: stable'. Both Deployments have the selector 'app: myapp'. You have a Service 'app-service' with selector 'app: myapp, track: stable'. How can you route traffic to the canary?
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
✓
Add label 'track: canary' to the canary pod template and set the Service selector to 'app: myapp, track: canary'
To route traffic to the canary, the Service selector must match the canary pods' labels. The current Service selector is 'app: myapp, track: stable', but the canary pods have 'app: myapp, version: canary'. Option B correctly adds the label 'track: canary' to the canary pod template and changes the Service selector to 'app: myapp, track: canary'. This makes the Service select only the canary pods, routing all traffic to the canary. Note: This removes the stable pods from the Service, but among the given choices, B is the only correct approach to achieve traffic to the canary.
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 a different Service for canary with selector 'app: myapp, track: canary' and keep the original Service unchanged
Why it's wrong here
This would create a new Service, but the question likely expects updating the existing Service. However, this is also valid but not listed as an option; B is the intended answer.
- ✓
Add label 'track: canary' to the canary pod template and set the Service selector to 'app: myapp, track: canary'
Why this is correct
This routes traffic only to the canary pods via the Service.
- ✗
Modify the Service selector to 'app: myapp' and rely on the 'version' label to differentiate
Why it's wrong here
Without 'track' label, Service will include both stable and canary pods, not a controlled canary.
- ✗
Change the canary Deployment's selector to 'version: canary' and update the Service selector to include 'version: canary'
Why it's wrong here
The Deployment's selector must match the pod template labels; changing it may cause issues. Also, the Service would need to match both versions? Not correct.
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.