Question 1
A platform engineering team is deploying a new version of a critical microservice using a blue-green strategy on Tanzu Kubernetes Grid. The current 'blue' version is serving 100% of production traffic via a Kubernetes Service named payment-svc. The new 'green' deployment is running and has been tested internally. Which action is the most effective and standard way to switch production traffic to the 'green' version with zero downtime?
Answer and explanation
Correct answer: B
The most efficient and standard Kubernetes-native way to switch traffic in a blue-green deployment is to update the selector of the existing Service. A kubectl patch or kubectl apply on the service manifest achieves this atomically, redirecting all traffic from the old pods to the new ones without any downtime or DNS changes. Deleting and recreating the service would cause a service outage. Using port-forward is for debugging, not production traffic. Modifying the deployment's labels would not change where the existing service is pointing.