Medium1 markMultiple Choice
Domain 4.3: Managing Cloud Run resourcesCloud RunTraffic SplittinggcloudCanary Deployment

GCP ACE · Question 36 · Domain 4.3: Managing Cloud Run resources

You have a Cloud Run service named 'payment-api'. You just deployed a new revision of the service, but you only want 10% of the incoming traffic to be routed to the new revision for testing, while 90% remains on the old revision.

Which command should you use to configure this?

Answer options:

A.

gcloud run deploy payment-api --traffic=10

B.

gcloud run services update-traffic payment-api --to-revisions=payment-api-v2=10,payment-api-v1=90

C.

kubectl apply -f traffic-split.yaml

D.

gcloud compute backend-services update payment-api --custom-routing=10,90

How to approach this question

Identify the specific gcloud command used for traffic management in Cloud Run.

Full Answer

B.gcloud run services update-traffic payment-api --to-revisions=payment-api-v2=10,payment-api-v1=90✓ Correct
Cloud Run supports traffic splitting, allowing you to route a percentage of traffic to different revisions of a service (useful for canary deployments). The command `gcloud run services update-traffic` is used to allocate traffic percentages to specific revision names.

Common mistakes

Assuming you have to configure an external load balancer to do this. Cloud Run has built-in traffic splitting capabilities.

Practice the full GCP Associate Cloud Engineer Practice Exam 7

50 questions · hints · full answers · grading

More questions from this exam