CertKeen

Google Cloud Associate Cloud Engineer · Free practice question 8 of 12

kubectl rollout undo for bad releases

Minutes after updating the image of the billing Deployment in a GKE cluster at Quayside Finance, error rates spike. The team wants to return the Deployment to its previous revision immediately. Which command should they run?

  1. A.kubectl delete deployment billing
  2. B.kubectl scale deployment billing --replicas=0
  3. C.kubectl rollout undo deployment billing
  4. D.gcloud container clusters upgrade billing --rollback
Show answer and explanation

Correct answer: C. kubectl rollout undo deployment billing

Why: kubectl rollout undo rolls a Deployment back to its previous revision using the stored rollout history. Deleting the Deployment or scaling it to zero causes a full outage, and gcloud container clusters upgrade manages cluster versions rather than application revisions.

More free Google Cloud Associate Cloud Engineer questions