Search code examples
google-cloud-platformvscode-extensionsgoogle-cloud-run

ERROR: (gcloud.run.deploy) spec.template.spec.containers.resources.limits.cpu: Invalid value specified for cpu


I'm getting this error when trying to deploy on Google Cloud Run using VS Code with the Google Cloud Code extension. How can I solve this?

ERROR: (gcloud.run.deploy) spec.template.spec.containers.resources.limits.cpu: Invalid value specified for cpu. For the specified value, maxScale may not exceed 10.


Solution

  • Even though I didn't find a solution via the UI, it can be solved via the command line in this way:

    gcloud run deploy ... --max-instances 10
    

    It seems the default value for maxScale (max-instances) is 100.