Generate Cloud Run service configuration with concurrency, scaling, and environment settings.
Last verified: May 2026
Generate Cloud Run service configuration with concurrency, scaling, and environment settings.
Required Fields
apiVersionkindmetadatametadata.namespecOutput will appear here...The GCP Cloud Run Service YAML Generator creates Cloud Run service configuration YAML files for deploying containerized applications. Cloud Run is a fully managed serverless platform that automatically scales containers. This tool helps you configure container images, resource limits, scaling parameters, environment variables, secrets, VPC connectors, and traffic splitting, generating the service YAML for deployment via gcloud or YAML apply.
Your team is migrating a Cloud Run service from manual gcloud command-based deploys (which drifted across environments) to declarative YAML. The generator helps you build the canonical service.yaml: 256 MB / 1 CPU, concurrency 80, min instances 1 for production / 0 for staging, VPC connector for Cloud SQL access, secrets injected from Secret Manager. The same template works for both environments via gcloud variable substitution. Drift between staging and production disappears.
Concurrency is the most-impactful Cloud Run setting and the most-misunderstood. Default 80 means each container instance handles 80 simultaneous requests. Setting it to 1 (one-request-per-instance) makes Cloud Run scale 80x more instances for the same traffic — fine for CPU-bound work, expensive for I/O-bound work. Always benchmark your real workload before lowering from default.
Min instances eliminates cold starts but bills you 24/7 even at zero traffic — about $15-20/month per always-on instance. For user-facing APIs where the first-request-after-idle latency matters, this is worth it. For internal/webhook services, just accept the cold start.
Traffic splitting + revision tags let you do true canary deploys: deploy a new revision with `--no-traffic`, send 5% via the canary tag, monitor for 30 minutes, then promote. The Cloud Run UI makes this trivial but the gcloud commands are non-obvious — the YAML generator gets the syntax right.
The generator builds a Knative-style Service YAML conforming to the Cloud Run schema: spec.template.spec.containers (image, resources, env, ports, volumeMounts), spec.template.metadata.annotations (autoscaling.knative.dev/maxScale, run.googleapis.com/cpu-throttling, run.googleapis.com/vpc-access-connector), and spec.traffic for traffic splitting. Output works with `gcloud run services replace` for declarative deploys.
Was this tool helpful?
Disclaimer: This tool runs entirely in your browser. No data is sent to our servers. Always verify outputs before using them in production. AWS, Azure, and GCP are trademarks of their respective owners.