Bird
0
0

How should you configure the Service to achieve this traffic split?

hard📝 Workflow Q15 of 15
Kubernetes - Advanced Deployment Patterns
You want to roll out a canary deployment with 10% traffic to the new version and 90% to stable. You have 10 stable pods and 2 canary pods. How should you configure the Service to achieve this traffic split?
ASet Service selector to include both stable and canary labels and use weighted routing with 10% weight on canary
BCreate two Services, one for stable and one for canary, and use an Ingress with traffic splitting
CUse a single Deployment with 12 replicas and update image tag gradually
DSet Service selector to only stable label and manually scale canary pods to 1
Step-by-Step Solution
Solution:
  1. Step 1: Understand traffic splitting in Kubernetes Service

    Standard Kubernetes Service does not support weighted traffic splitting by itself.
  2. Step 2: Identify method to split traffic by percentage

    Using two Services and an Ingress or service mesh allows weighted traffic splitting (e.g., 10% to canary, 90% to stable).
  3. Step 3: Evaluate options

    Create two Services, one for stable and one for canary, and use an Ingress with traffic splitting describes creating two Services and using Ingress for traffic splitting, which is the correct approach.
  4. Final Answer:

    Create two Services, one for stable and one for canary, and use an Ingress with traffic splitting -> Option B
  5. Quick Check:

    Weighted traffic split requires Ingress or service mesh [OK]
Quick Trick: Use Ingress or service mesh for weighted traffic split [OK]
Common Mistakes:
  • Expecting Service selector to do weighted routing
  • Scaling pods to control traffic percentage
  • Using single Deployment for canary traffic split

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes