Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am trying to deploy a Python (Gunicorn) application on CloudRun (fully managed). Most of the time the newest deployed revision receives 100% of traffic directly after I run the deploy command. However, from time to time, the deploy commands says the newest revision receives 0% of traffic (and when I try to reach the application, I am indeed redirected to an older version).

gcloud beta run deploy my-app 
  --platform=managed 
  --allow-unauthenticated 
  --project my-project 
  --region europe-west1 
  --port=80 
  --memory=1Gi 
  --service-account my-app@my-project.iam.gserviceaccount.com 
  --min-instances=1 
  --image=europe-west1-docker.pkg.dev/my-project/my-registry/my-app:latest

Deploying container to Cloud Run service [my-app] in project [my-project] region [europe-west1]
Service [my-app] revision [my-app-00044-zay] has been deployed and is serving 0 percent of traffic.

Why doesn't my revision receive traffic ?

question from:https://stackoverflow.com/questions/65847488/why-doesnt-my-newest-cloudrun-revision-receive-traffic

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
238 views
Welcome To Ask or Share your Answers For Others

1 Answer

Assuming you have previously used --no-traffic this is working as intended as this option is persistent. Try running gcloud run services update-traffic --to-latest

Reference doc: https://cloud.google.com/sdk/gcloud/reference/run/deploy#--no-traffic


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...