A Cloud Engineer is tasked with performing a canary release for an updated container image on an existing Cloud Run service named `orders-api`. The objective is to deploy the updated revision without exposing it to live production traffic immediately, perform validation on the revision's dedicated URL, gradually shift 10% of production traffic to the new revision, and monitor its operational metrics. Sequence the following deployment and traffic management steps in the correct order from first to last.
- 1Execute `gcloud run deploy orders-api --image [IMAGE_URI] --no-traffic` to deploy the new revision without routing production traffic to it.
- 2Send test requests to the revision-specific URL (or tagged URL) of the newly created revision to verify functionality.
- 3Execute `gcloud run services update-traffic orders-api --to-revisions [NEW_REVISION_NAME]=10` to shift 10% of live traffic to the new revision.
- 4Monitor error rates and request latency in Cloud Logging and Cloud Monitoring for the canary revision.
Answer
The correct sequence of steps for a Cloud Run canary deployment is: 1) Deploy the new container image using `gcloud run deploy` with the `--no-traffic` flag, 2) Test the new revision using its direct revision-specific URL, 3) Update the traffic distribution using `gcloud run services update-traffic` to route 10% of traffic to the new revision, and 4) Monitor service logs and metrics in Cloud Operations to verify operational health.
The deployment workflow requires creating the revision safely without live traffic (`--no-traffic`), verifying its health via direct revision URL targeting, applying a 10% canary traffic split with `gcloud run services update-traffic`, and finally inspecting metrics in Cloud Operations to ensure baseline operational stability.
Step-by-Step Solution
Key Concept
Canary Deployments and Traffic Splitting in Cloud Run