Google Cloud Associate Cloud Engineer — Question 289
You recently discovered an issue with your rolling update in Google Kubernetes Engine (GKE). You now need to roll back a rolling update. What should you do?
Answer options
- A. Delete the deployment.
- B. Use the kubectl rollout restart command to revert the deployment.
- C. Use the kubectl rollout undo command.
- D. Manually scale down the new Pods and scale up the old Pods.
Correct answer: C
Explanation
The correct option is C, as the kubectl rollout undo command is specifically designed to revert a deployment to its previous state. Option A, deleting the deployment, would result in the loss of all configurations and history. Option B restarts the deployment rather than rolling it back, and option D does not effectively manage the deployment history or ensure a proper rollback.