Google Professional Cloud DevOps Engineer Question 115
Single answerGoogle Cloud PlatformYour team is deploying a new version of a microservice to production in Google Cloud using a rolling update strategy. After deployment, you notice a critical bug affecting user experience. What is the most appropriate rollback strategy in this scenario to minimize downtime while ensuring a stable version is restored?
- A
Revert the deployment by updating the Kubernetes Deployment object to the previous version.
- B
Perform a manual rollback by redeploying the previous version using a fresh Deployment object.
- C
Use a blue/green deployment approach to immediately switch traffic back to the stable version.
- D
Scale down all pods of the faulty version to zero and manually rebuild the stable version from source.
Show answer and explanation
Correct answer: A
Explanation
In a rolling update scenario, Kubernetes maintains a history of deployment revisions, allowing you to quickly rollback to a previous stable version by simply reverting the Deployment object. This minimizes downtime and ensures a reliable rollback process without requiring complex manual intervention.
- A. Correct.
Correct. Reverting the Kubernetes Deployment object to the previous version is the most efficient and reliable rollback method in this scenario. Kubernetes maintains deployment history, enabling a quick and seamless rollback.
- B. Incorrect.
Incorrect. While redeploying the previous version using a fresh Deployment object could work, it is not the most efficient approach in this case. It introduces additional complexity and increases downtime.
- C. Incorrect.
Incorrect. Blue/green deployment is a proactive deployment strategy, not a rollback mechanism. It cannot be applied here since the faulty version is already live.
- D. Incorrect.
Incorrect. Manually scaling down pods and rebuilding the stable version is unnecessary and inefficient. Kubernetes provides built-in mechanisms to streamline rollbacks.