A Cloud Engineer notices elevated 5xx error rates following a recent deployment to a production Cloud Run service. To restore stability, the engineer must immediately route all live traffic back to the previous stable revision, reconfigure operational instance limits to handle expected traffic spikes, and clean up the broken revision. Arrange the operational steps in the correct logical sequence to execute this remediation workflow.
- 1List the existing service revisions using `gcloud run revisions list --service=[SERVICE_NAME]` to identify the exact revision ID of the previous stable deployment.
- 2Execute `gcloud run services update-traffic [SERVICE_NAME] --to-revisions=[STABLE_REVISION]=100` to immediately route all incoming production traffic away from the faulty revision.
- 3Execute `gcloud run services update [SERVICE_NAME] --min-instances=2 --max-instances=50` to adjust scaling bounds on the active configuration.
- 4Execute `gcloud run revisions delete [FAULTY_REVISION]` after verifying that the degraded revision is receiving 0% of traffic.
Cevap
The correct operational sequence is: 1) List revisions to identify the stable revision ID, 2) Shift 100% of production traffic to the stable revision using `gcloud run services update-traffic`, 3) Update service instance scaling limits using `gcloud run services update`, and 4) Delete the faulty revision using `gcloud run revisions delete`.
Remediating a failing release requires identifying the target revision first, shifting 100% of live traffic to that healthy revision to resolve user-facing errors, modifying operational parameters (min/max instances) on the service configuration, and finally purging the inactive faulty revision.
Adım Adım Çözüm
Anahtar Kavram
Cloud Run Traffic Management and Revision Lifecycle Operations