PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #79
You are building the CI/CD pipeline for an application deployed to Google Kubernetes Engine (GKE). The application is deployed by using a Kubernetes Deployment, Service, and Ingress. The application t
The correct answer is C. Update the Kubernetes Service to point to the previous Kubernetes Deployment.. In a blue/green deployment, two separate Kubernetes Deployments exist (e.g., app-blue and app-green). The Service routes traffic to one via its label selector. Rollback means updating the Service's selector to point back to the previous (stable) Deployment. kubectl rollout undo (
Question
Options
- ARun the kubectl rollout undo command.
- BDelete the new container image, and delete the running Pods.
- CUpdate the Kubernetes Service to point to the previous Kubernetes Deployment.
- DScale the new Kubernetes Deployment to zero.
How the community answered
(43 responses)- A12% (5)
- B2% (1)
- C77% (33)
- D9% (4)
Explanation
In a blue/green deployment, two separate Kubernetes Deployments exist (e.g., app-blue and app-green). The Service routes traffic to one via its label selector. Rollback means updating the Service's selector to point back to the previous (stable) Deployment. kubectl rollout undo (A) reverts a rolling deployment's history - it does not apply to blue/green. Deleting pods (B) causes downtime and doesn't restore stable traffic. Scaling the new Deployment to zero (D) removes capacity but doesn't redirect traffic to the stable version.
Topics
Community Discussion
No community discussion yet for this question.