A cloud administrator recently deployed a new revision named `orders-v2` for an existing Cloud Run service named `order-processor` in the `us-central1` region. During testing, the administrator specified the `--no-traffic` flag, so 100% of production traffic is still being served by the previous revision `orders-v1`. After verifying that `orders-v2` functions correctly, the administrator needs to immediately route all incoming production traffic to `orders-v2`. Which `gcloud` command should the administrator execute to achieve this target configuration?
- gcloud run services update-traffic order-processor --region=us-central1 --to-revisions=orders-v2=100Cevap
- Bgcloud run services update order-processor --region=us-central1 --image=gcr.io/my-project/orders:v2
- Cgcloud functions deploy order-processor --region=us-central1 --update-traffic=orders-v2=100
- Dgcloud iam service-accounts add-iam-policy-binding [email protected] --role=roles/owner
Cevap
Execute `gcloud run services update-traffic order-processor --region=us-central1 --to-revisions=orders-v2=100` to direct all live traffic to the specified revision.
The command using `gcloud run services update-traffic` with the `--to-revisions=orders-v2=100` flag explicitly adjusts the traffic management configuration of the target Cloud Run service so that 100% of incoming production requests are routed to the specified revision.
Adım Adım Çözüm
Anahtar Kavram
Cloud Run Traffic Management