An organization manages a critical microservice deployed on Cloud Run named `payment-processor` in the `us-central1` region. Following the deployment of a new revision named `payment-processor-00005-xyz`, Cloud Monitoring metrics reveal a sharp increase in HTTP 500 error rates. The operations team needs to immediately redirect 100% of live incoming production traffic back to the previous stable revision named `payment-processor-00004-abc` without deleting the failed revision so developers can inspect its logs. Which `gcloud` CLI command should the operations team run to execute this rollback?
- gcloud run services update-traffic payment-processor --to-revisions=payment-processor-00004-abc=100 --region=us-central1Answer
- Bgcloud run services update payment-processor --to-revision=payment-processor-00004-abc --region=us-central1
- Cgcloud functions deploy payment-processor --source-revision=payment-processor-00004-abc --region=us-central1
- Dgcloud run revisions delete payment-processor-00005-xyz --region=us-central1
Answer
Execute `gcloud run services update-traffic payment-processor --to-revisions=payment-processor-00004-abc=100 --region=us-central1` to immediately route all production traffic back to the stable revision.
The command `gcloud run services update-traffic payment-processor --to-revisions=payment-processor-00004-abc=100 --region=us-central1` correctly routes 100% of live traffic to the specified healthy revision while leaving the faulty revision intact for troubleshooting.
Step-by-Step Solution
Key Concept
Cloud Run Traffic Management and Revision Rollbacks