GCP Cloud Run
Creates complete Google Cloud Run deployment configurations for running containerized applications as fully managed serverless services. Covers service YAML definitions, Dockerfile optimization, traffic splitting, custom domains, VPC connectors, Secret Manager integration, Cloud SQL connections, and IAM-based authentication with auto-scaling policies.
Usage
Describe your containerized application, its runtime requirements, expected traffic patterns, and any GCP services it needs to connect to (Cloud SQL, Pub/Sub, Cloud Storage). Specify concurrency settings, memory/CPU needs, and whether the service should be public or authenticated. The skill generates complete deployment configurations and gcloud commands.
Examples
- "Deploy a Python FastAPI app to Cloud Run with Cloud SQL PostgreSQL connection and auto-scaling 0-10"
- "Create a Cloud Run service with VPC connector for accessing private resources in a shared VPC"
- "Set up a Cloud Run job that processes Pub/Sub messages with dead-letter queue handling"
- "Configure traffic splitting for a canary deployment: 90% stable, 10% new revision"
Guidelines
- Set minimum instances to 0 for cost savings, or 1+ for latency-sensitive services to avoid cold starts
- Use Cloud Run's built-in concurrency (up to 1000 per instance) to maximize instance efficiency
- Connect to Cloud SQL via Unix sockets through the built-in proxy, not TCP with public IP
- Store secrets in Secret Manager and mount them as environment variables or volumes
- Use multi-stage Docker builds to minimize container image size and reduce cold start times
- Set appropriate CPU and memory limits; use CPU-boost for faster cold starts on compute-heavy apps
- Configure request timeouts and maximum retries appropriate to your service's SLA requirements
- Use service-to-service authentication with IAM invoker permissions instead of API keys