Courseiva
Application Deployment →mediumMultiple Choice

CKAD Application Deployment Practice Question

You are performing a blue-green deployment. You have two Deployments: 'app-blue' and 'app-green', each with 5 replicas. Both are labeled with 'app: myapp'. The Service 'myapp-svc' selects pods with 'app: myapp' and 'version: blue'. After deploying the new version to 'app-green' and verifying it, what change is required to switch traffic to the green deployment?

⚠ Common exam trap

A common mix-up: candidates think they need to modify pod labels or scale down the old deployment, but the correct approach is to update the Service selector, which is the central mechanism for traffic routing in Kubernetes.

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 Service selector to 'version: green'

In a blue-green deployment, traffic is switched by updating the Service's selector to match the labels of the new version's pods. Here, the Service 'myapp-svc' selects pods with 'version: blue'. To route traffic to the green deployment, you must change the selector to 'version: green'. This causes the Service to immediately forward traffic to the green pods without modifying the pods themselves.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Update the label on app-green pods to 'version: blue'

    Why it's wrong here

    Changing the label on green pods to 'blue' would make them match the existing Service selector (version: blue), so the Service would route traffic to both old blue and new green pods simultaneously. This splits traffic between versions, which is not the goal of a blue-green cutover, and it makes rollback ambiguous because green is now mislabeled. The correct action is to keep labels as-is and change the Service selector to 'green'.

  • ✓

    Update the Service selector to 'version: green'

    Why this is correct

    The Service acts as the traffic switch in a blue-green deployment; updating its selector from 'blue' to 'green' atomically redirects all client traffic to the green pods. Because green pods are already deployed and ready, this change requires no downtime and no pod restarts. This is the canonical cutover step: the selector change is the single point of control that moves production traffic to the new version.

  • ✗

    Scale down app-blue to 0 replicas

    Why it's wrong here

    Scaling the blue Deployment to zero removes its pods, but the Service selector still points to 'version: blue', leaving the Service with no matching endpoints. As a result, traffic to the Service fails or is dropped, even though green pods are available. This action alone does not perform a cutover; it only shuts down the old version, and it should be done only after the Service selector has been switched to green.

  • ✗

    Delete app-blue deployment

    Why it's wrong here

    Deleting the blue Deployment is destructive and irreversible; it removes the blue pods without altering the Service selector, which continues to target 'version: blue'. With no endpoints matching the selector, the Service has no healthy pods to route to, causing an outage. Similar to scaling down, this is a cleanup step after the selector has been changed to green, not a mechanism for directing traffic to the new version.

About these practice questions

Courseiva writes every CKAD question from scratch — 826 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 →

How Courseiva writes practice questions · Editorial policy

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.