CKAD Application Deployment Practice Question
You are using a canary deployment strategy with Deployments and Services. You have a stable version (v1) and a canary version (v2). Both Deployments have the label 'app: myapp'. The Service selector is 'app: myapp'. How can you route a small percentage of traffic to the canary?
⚠ Common exam trap
The trap is to overcomplicate the solution by introducing a specialized Ingress controller or modifying the Service selector, when the simplest approach is to adjust replica counts while keeping the selector unchanged.
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 the canary Deployment replicas to 1 and the stable to 9, and keep the Service selector as 'app: myapp'
The Service selector 'app: myapp' matches both Deployments, and by setting the canary to 1 replica and the stable to 9, the Service's round-robin load balancing (by default) distributes roughly 10% of traffic to the canary Pods and 90% to the stable Pods. This is a simple, native Kubernetes canary pattern that requires no additional components like Ingress controllers.
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 both Deployments to 10 replicas and use an Ingress with a canary weight annotation (e.g., canary-weight: '10')
Why it's wrong here
This approach fails because the Service's selector `app: myapp` will distribute traffic equally across all pods matching that label, regardless of their originating Deployment. With both Deployments at 10 replicas, the Service would route 50% of traffic to v1 and 50% to v2. Ingress canary weight annotations are designed to split traffic between *different backend Services*, not to influence how a single Service load-balances across its endpoints. This method would be correct if there were separate Services for v1 and v2, allowing the Ingress to direct a weighted percentage of requests to each distinct Service.
- ✗
Set the canary Deployment replicas to 1 and the stable to 9, and update the Service selector to include version: v2
Why it's wrong here
Setting replicas to 1 canary and 9 stable, but changing the Service selector to include version: v2, would cause the Service to match only canary pods because stable pods presumably do not carry version: v2. As a result, all requests would be routed exclusively to the canary Deployment, not 10% of traffic, and the stable Deployment would receive zero traffic. This selector misconfiguration makes the replica ratio irrelevant, breaking the desired canary split entirely.
- ✗
Set the canary Deployment replicas to 10 and the stable to 1
Why it's wrong here
With canary replicas set to 10 and stable to 1, the Service's default load-balancing algorithm distributes requests proportionally to the number of ready endpoints. If the Service selector matches pods from both Deployments, roughly 91% of traffic would go to the canary and only about 9% to stable, which is the opposite of a controlled canary release. This configuration effectively tests new code on the majority of users, increasing risk and defeating the purpose of a small canary percentage.
- ✓
Set the canary Deployment replicas to 1 and the stable to 9, and keep the Service selector as 'app: myapp'
Why this is correct
Keeping the Service selector as 'app: myapp' while setting canary replicas to 1 and stable to 9 ensures that both Deployments' pods match the selector. The Service then performs round-robin or random load balancing across all matching endpoints, so traffic is distributed proportionally to pod counts—approximately 10% to canary and 90% to stable. This is the correct method because it uses the natural endpoint-count-based weighting of a Service without introducing label restrictions that would isolate one version.
Go deeper
Related to this question
About these practice questions
Courseiva writes every CKAD question from scratch — 160 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 →
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.