4

I have been using Google Cloud with free trial account.

I was able to deploy Cloud Run builds from my Github repository. However, since I have started using a Google Cloud Kubernetes Cluster & Jobs using 2 VM in Google Compute Engine, the Cloud Run deployments have started failing :

Step #2 - "Deploy": gcr.io/google.com/cloudsdktool/cloud-sdk:slim Step #2 - "Deploy": Deploying... Step #2 - "Deploy": failed Step #2 - "Deploy": Deployment failed Step #2 - "Deploy": ERROR: (gcloud.run.services.update) spec.template.spec.containers[0].resources.limits.cpu: Invalid value specified for cpu. For the specified value, maxScale may not exceed 30. Step #2 - "Deploy": Consider running your workload in a region with greater capacity, decreasing your requested cpu-per-instance, or requesting an increase in quota for this region if you are seeing sustained usage near this limit, see https://cloud.google.com/run/quotas. Your project may gain access to further scaling by adding billing information to your account. Finished Step #2 - "Deploy" ERROR ERROR: build step 2 "gcr.io/google.com/cloudsdktool/cloud-sdk:slim" failed: step exited with non-zero status: 1 

enter image description here

How much CPU is required for succesful Cloud Run deployments ? Here is the Inline Cloud Run deployment yaml file :

steps: - name: gcr.io/k8s-skaffold/pack env: - GOOGLE_ENTRYPOINT=$_ENTRYPOINT args: - build - '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA' - '--builder=gcr.io/buildpacks/builder:v1' - '--network=cloudbuild' - '--path=.' - '--env=GOOGLE_ENTRYPOINT' id: Buildpack entrypoint: pack - name: gcr.io/cloud-builders/docker args: - push - '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA' id: Push - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:slim' args: - run - services - update - $_SERVICE_NAME - '--platform=managed' - '--image=$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA' - >- --labels=managed-by=gcp-cloud-build-deploy-cloud-run,commit-sha=$COMMIT_SHA,gcb-build-id=$BUILD_ID,gcb-trigger-id=$_TRIGGER_ID,$_LABELS - '--region=$_DEPLOY_REGION' - '--quiet' id: Deploy entrypoint: gcloud images: - '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA' options: substitutionOption: ALLOW_LOOSE substitutions: _LABELS: gcb-trigger-id=xxxxxx-d5fd-47b7-8949-xxxxxxxxxx _TRIGGER_ID: xxxxxx-d5fd-47b7-8949-xxxxxxxxxx _DEPLOY_REGION: europe-west1 _GCR_HOSTNAME: eu.gcr.io _PLATFORM: managed _SERVICE_NAME: videoo-app-dev _ENTRYPOINT: 'gunicorn -b :$PORT videoo.wsgi' tags: - gcp-cloud-build-deploy-cloud-run - gcp-cloud-build-deploy-cloud-run-managed - videoo-app-devs 

What should be the approach here to recover backs successful deployments ?

8
  • What is your CPU quota for that region? It looks like you need to either use a different region or request a quota increase. cloud.google.com/compute/quotas Commented Aug 9, 2022 at 20:53
  • How do I check my cpu quota for that region? Commented Aug 9, 2022 at 21:08
  • 1
    Did you read the document link I provided? "Check your quota" is the second item in the index at the top of the page. Commented Aug 9, 2022 at 21:31
  • Ok, I have checked it, but my question is : how much CPU or resources does Cloud Build or Cloud Run implicitly requires for deploying the Cloud Run Application ? Commented Aug 9, 2022 at 22:02
  • 1
    The error is coming from Cloud Run. Cloud Build is running the command. You have a quota problem, the solution is to increase the quota. You might be able to switch regions, but since you are on a Free Trial account, you probably must contact Google. Think of quotas as credit limits. You hit yours. Commented Aug 9, 2022 at 23:51

2 Answers 2

7

Add in your args

--max-instances=29 

or any amount less than 30

Sign up to request clarification or add additional context in comments.

Comments

5

Just go to the cloud run page : Click on Edit and Deploy New Version. Now just decrease the autoscaling to 30 or 50, the maximum number of instances allowed will be mentioned on the error.

I had the same issue yesterday.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.