Medium1 markMultiple Choice
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?
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
Q01You are starting a new initiative and need to create a new Google Cloud project using the Cloud S...EasyQ02Your company is migrating to Google Cloud and wants to manage user identities centrally. They cur...MediumQ03You have just created a new Google Cloud project and want to deploy a containerized application u...MediumQ04Your finance team wants to perform complex SQL queries on your Google Cloud billing data to analy...MediumQ05You are managing a development project in Google Cloud. You want to ensure that you are notified ...Easy
Expert