A Cloud Engineer needs to execute a safe canary rollout of a updated container image for an existing Cloud Run service named `order-processor`. Arrange the operational steps in the correct order from first to last to complete the canary deployment and traffic transition without risking immediate full-production downtime.
- 1Deploy the new revision using `gcloud run deploy order-processor --image LOCATION-docker.pkg.dev/PROJECT_ID/REPO/IMAGE:TAG --no-traffic --tag canary`.
- 2Send test HTTP requests to the tag-specific URL `https://canary---order-processor-REGION.a.run.app` to validate revision functionality.
- 3Execute `gcloud run services update-traffic order-processor --to-tags canary=10` to route 10% of live traffic to the canary revision.
- 4Execute `gcloud run services update-traffic order-processor --to-latest` to route 100% of live traffic to the new revision after health metrics remain stable.
Answer
The correct sequence for a Cloud Run canary rollout is: 1) Deploy the new image using `--no-traffic` and assign a revision tag. 2) Direct verification requests to the tag-specific URL. 3) Route a small percentage of live traffic to the tagged revision. 4) Shift 100% of live production traffic to the latest revision.
A safe canary deployment in Cloud Run follows a distinct lifecycle: first creating the new revision isolated with `--no-traffic` and a dedicated tag, testing the tag-specific URL directly, initiating a partial live traffic split using `gcloud run services update-traffic --to-tags`, and finally updating the service traffic to 100% (`--to-latest`) once stability is verified.
Step-by-Step Solution
Key Concept
Cloud Run Revision Tagging and Traffic Splitting Sequence