A senior DevOps engineer is managing a stateless containerized web service deployed on Google Cloud Run in the us-central1 region. The existing service named order-processor currently has all production traffic (100%) routed to revision order-processor-v1. To conduct a canary deployment of a newly built container image, the engineer successfully deploys the new code without shifting live traffic by running gcloud run deploy order-processor --image=gcr.io/corp-apps/order-processor:v2 --region=us-central1 --no-traffic. This deployment generates a new revision named order-processor-v2. The engineer now needs to safely route exactly 20% of incoming live HTTP requests to order-processor-v2 while maintaining the remaining 80% on order-processor-v1. Which gcloud command should the engineer execute to achieve this traffic distribution?
- Execute gcloud run services update-traffic order-processor --region=us-central1 --to-revisions=order-processor-v2=20.Cevap
- BRe-run gcloud run deploy order-processor --image=gcr.io/corp-apps/order-processor:v2 --region=us-central1 --traffic-split=order-processor-v2=20.
- CAssign the roles/editor primitive role to the default Compute Engine service account so IAM policy rules can automatically rebalance load across active revisions.
- DRedeploy the application to Cloud Functions (2nd gen) using gcloud functions deploy order-processor --split-traffic=order-processor-v2=20 because Cloud Run revisions cannot share live HTTP traffic.