Bird
0
0

You want to roll back your Cloud Run service web-app to a previous revision web-app-00003 safely without downtime. Which sequence of commands achieves this?

hard📝 Best Practice Q15 of 15
GCP - Cloud Run
You want to roll back your Cloud Run service web-app to a previous revision web-app-00003 safely without downtime. Which sequence of commands achieves this?
Agcloud run deploy web-app --image=web-app-00003
Bgcloud run services update web-app --revision web-app-00003
Cgcloud run revisions delete web-app-00004 && gcloud run services update-traffic web-app --to-revisions web-app-00003=100
Dgcloud run services update-traffic web-app --to-revisions web-app-00003=100
Step-by-Step Solution
Solution:
  1. Step 1: Understand rollback via traffic routing

    Rolling back means routing traffic back to an existing previous revision.
  2. Step 2: Use traffic update command

    Use gcloud run services update-traffic to send 100% traffic to the old revision.
  3. Step 3: Avoid deleting revisions or redeploying

    Deleting or redeploying is unnecessary and may cause downtime.
  4. Final Answer:

    gcloud run services update-traffic web-app --to-revisions web-app-00003=100 -> Option D
  5. Quick Check:

    Rollback by routing traffic to old revision [OK]
Quick Trick: Rollback by updating traffic to old revision, no redeploy needed [OK]
Common Mistakes:
  • Trying to redeploy old revision as image
  • Deleting newer revisions unnecessarily
  • Using wrong commands to update revision

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes