Google Cloud Professional Cloud DevOps Engineer — Question 96
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 team asked you to deploy the application by using the blue/green deployment methodology. You need to implement the rollback actions. What should you do?
Answer options
- A. Run the kubectl rollout undo command.
- B. Delete the new container image, and delete the running Pods.
- C. Update the Kubernetes Service to point to the previous Kubernetes Deployment.
- D. Scale the new Kubernetes Deployment to zero.
Correct answer: C
Explanation
The correct answer is C because updating the Kubernetes Service to point to the previous Deployment enables a straightforward rollback without losing any configuration. Option A only undoes the last rollout and may not target the correct Deployment. Option B involves deleting images and Pods, which is not necessary for a rollback. Option D would stop the new Deployment but would not restore the previous version effectively.