Deploy a small service to Cloud Run from the agent
Когда использовать: You have a Node/Python service ready. You want it live on Cloud Run without context-switching to the console.
Предварительные требования
- gcloud SDK installed + authenticated —
gcloud auth login && gcloud auth application-default login - A GCP project with billing enabled —
gcloud projects list
Поток
-
List projects, pick the right oneList my GCP projects. I want to deploy to the one tagged with 'staging'.✓ Скопировано→ Project identified
-
Deploy the local folderDeploy ./my-api as a Cloud Run service named 'api-staging' in us-central1. Allow unauthenticated invocations. Use the auto-detected buildpack.✓ Скопировано→ Deploy completes, URL returned
-
VerifyGet the service details. Call the URL with a curl-style test. Confirm 200.✓ Скопировано→ Working service URL
Итог: A running Cloud Run service in 3-5 minutes, with the agent recording the URL for you.
Подводные камни
- Unauthenticated flag exposes the service publicly — great for staging, bad for prod — For anything prod-adjacent, omit
allow_unauthenticatedand use IAM; front with Cloud Armor if user-facing - Each deploy creates a new revision, old ones linger and pin resources — Periodically clean up old revisions with gcloud, or configure revision retention