mediumMultiple ChoiceObjective-mapped
Google ACE Practice Question: A team deploys a new version of their application…
A team deploys a new version of their application using a blue-green strategy on GKE. The 'green' deployment is running but still in testing. When ready, traffic should instantly switch from 'blue' to 'green' with rollback possible in seconds. How is the instant switch implemented?
⚠ Common exam trap
Google Cloud often tests the misconception that updating a Deployment's image tag or using kubectl patch on ClusterIP is the correct way to switch traffic, when in fact the Service's label selector is the precise mechanism for instant traffic redirection in blue-green deployments.
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's label selector from 'version: blue' to 'version: green'
In a blue-green deployment on GKE, the Service acts as a stable network endpoint abstracting the underlying Pods. By changing the Service's label selector from 'version: blue' to 'version: green', traffic is instantly routed to the green Pods without any downtime or need to recreate resources. This allows immediate rollback by simply reverting the selector back to 'version: blue'.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Delete the blue Deployment and create the green Deployment as the replacement
Why it's wrong here
Deleting the blue Deployment before creating the green Deployment is effectively a recreate deployment strategy, which causes an outage window between the old Pods terminating and the new Pods becoming Ready. Even with fast startup, this breaks the blue-green requirement of keeping both versions live simultaneously, and it removes the ability to instantaneously roll back by toggling the Service selector. Additionally, you would still need to update the Service selector to point to the green Pods, so deleting blue is an unnecessary and disruptive step.
- ✓
Update the Service's label selector from 'version: blue' to 'version: green'
Why this is correct
Changing the Service's label selector from version: blue to version: green repoints the Service's Endpoints to the green Pods immediately, because Kubernetes Services route traffic by matching Pod labels, not by any explicit backend list. Since the blue Deployment remains untouched, it stays running with its Pods intact, making a rollback as simple as reverting the selector back to blue. No downtime occurs because the green Pods are already healthy and registered as ready before the switch, and the Service's ClusterIP and DNS name remain unchanged.
- ✗
Update the Deployment's container image tag — GKE automatically performs a blue-green rollout
Why it's wrong here
Updating a Deployment's container image tag triggers a rolling update by default, in which the Deployment gradually replaces existing ReplicaSets rather than performing a blue-green switch. Kubernetes has no built-in 'blue-green' rollout mode for a single Deployment; the pattern requires two separate Deployments (blue and green) with a shared Service that you flip from one version's selector to the other. GKE does not automatically convert an image update into a blue-green deployment, so this option misrepresents the platform's native behavior.
- ✗
Use kubectl patch to update the Service's ClusterIP to point to the green Deployment
Why it's wrong here
ClusterIP is an immutable virtual IP assigned to a Service at creation time—kubectl patch cannot change it, and even if it could, the IP does not serve as a pointer to a specific Deployment. Service traffic is dispatched to Pods through EndpointSlices built from the Service's label selector, so patching the ClusterIP would neither update those endpoints nor cause the green Pods to receive requests. The only meaningful way to redirect traffic is to modify the selector, because that is the mechanism Kubernetes uses to link Services to Pods.
Go deeper
Related to this question
Learn chapter
Deployment Manager and Terraform on GCP
Key term
Service
A service is a software component or system that performs a specific function and is available to be used by other programs or users over a network.
Key term
Switch
A switch is a networking device that connects devices on a local area network and uses MAC addresses to forward data only to the intended recipient.
About these practice questions
One of 769 original ACE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This ACE practice question is part of Courseiva's free Google Cloud 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 ACE exam.