CommunityProgramación y desarrollogithub.com

google/cloud-run-basics

Gestiona servicios, trabajos y grupos de workers de Cloud Run. Úsalo cuando necesites desplegar aplicaciones que respondan a peticiones HTTP (servicios), ejecutar tareas desencadenadas por eventos o programadas (trabajos), o manejar procesamiento en segundo plano basado en pull siempre activo (grupos de workers).

¿Qué es cloud-run-basics?

Este skill de agente de IA está diseñado para gestionar los recursos principales de Google Cloud Run: servicios, trabajos (jobs) y grupos de workers (worker pools). Es útil para desarrolladores y equipos que necesitan desplegar aplicaciones sin servidor que respondan a peticiones HTTP (servicios), ejecutar tareas desencadenadas por eventos o programadas (trabajos), o manejar procesamiento en segundo plano basado en pull siempre activo (grupos de workers). El skill se basa en la documentación oficial de SKILL.md de Google Cloud Run y proporciona instrucciones claras para interactuar con estos recursos mediante comandos de la CLI de gcloud. Permite crear, actualizar, eliminar y obtener información sobre servicios, trabajos y grupos de workers, así como gestionar sus configuraciones de concurrencia, tiempo de espera, variables de entorno y más. Está optimizado para agentes de IA como Claude Code, Cursor o Codex, y sigue las mejores prácticas de Cloud Run para asegurar despliegues eficientes y escalables.

Compatible con~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/google/skills/tree/main/skills/cloud-run-basics

Installed? Explore more Programación y desarrollo skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

¿Qué hace cloud-run-basics?

Gestiona servicios, trabajos y grupos de workers de Cloud Run. Úsalo cuando necesites desplegar aplicaciones que respondan a peticiones HTTP (servicios), ejecutar tareas desencadenadas por eventos o programadas (trabajos), o manejar procesamiento en segundo plano basado en pull siempre activo (grupos de workers).

Servicios

Un servicio de Cloud Run es un recurso que ejecuta tu aplicación en contenedores sin servidor, escalando automáticamente en respuesta a las peticiones HTTP.

Comandos para Servicios

  • gcloud run deploy SERVICE_NAME --image IMAGE_URL [--region REGION] [--platform managed] - Desplegar un nuevo servicio o actualizar uno existente.
  • gcloud run services describe SERVICE_NAME --region REGION - Obtener detalles de un servicio.
  • gcloud run services list --region REGION - Listar servicios en una región.
  • gcloud run services delete SERVICE_NAME --region REGION - Eliminar un servicio.

Ejemplo de Despliegue

gcloud run deploy my-service \
  --image us-central1-docker.pkg.dev/my-project/my-repo/my-image:latest \
  --region us-central1 \
  --platform managed \
  --concurrency 80 \
  --timeout 300 \
  --memory 512Mi \
  --set-env-vars "ENVIRONMENT=production,LOG_LEVEL=info"

Trabajos (Jobs)

Un trabajo de Cloud Run ejecuta tu código en contenedores sin servidor hasta su finalización. Es ideal para tareas desencadenadas por eventos o programadas.

Comandos para Trabajos

  • gcloud run jobs create JOB_NAME --image IMAGE_URL [--region REGION] - Crear un nuevo trabajo.
  • gcloud run jobs update JOB_NAME --image IMAGE_URL [--region REGION] - Actualizar un trabajo existente.
  • gcloud run jobs execute JOB_NAME [--region REGION] [--tasks TASKS] - Ejecutar un trabajo.
  • gcloud run jobs describe JOB_NAME --region REGION - Obtener detalles de un trabajo.
  • gcloud run jobs list --region REGION - Listar trabajos en una región.
  • gcloud run jobs delete JOB_NAME --region REGION - Eliminar un trabajo.

Ejemplo de Creación y Ejecución

gcloud run jobs create my-job \
  --image us-central1-docker.pkg.dev/my-project/my-repo/my-job-image:latest \
  --region us-central1 \
  --tasks 10 \
  --max-retries 3 \
  --task-timeout 600 \
  --set-env-vars "INPUT_BUCKET=my-input-bucket,OUTPUT_BUCKET=my-output-bucket"

gcloud run jobs execute my-job --region us-central1

Grupos de Workers (Worker Pools)

Un grupo de workers de Cloud Run proporciona un grupo de instancias de worker siempre activas para procesamiento en segundo plano basado en pull. Útil para colas de trabajo o procesamiento por lotes.

Comandos para Grupos de Workers

  • gcloud run worker-pools create POOL_NAME --image IMAGE_URL --min-instances MIN --max-instances MAX [--region REGION] - Crear un grupo de workers.
  • gcloud run worker-pools update POOL_NAME [--image IMAGE_URL] [--min-instances MIN] [--max-instances MAX] [--region REGION] - Actualizar un grupo de workers.
  • gcloud run worker-pools describe POOL_NAME --region REGION - Obtener detalles de un grupo de workers.
  • gcloud run worker-pools list --region REGION - Listar grupos de workers en una región.
  • gcloud run worker-pools delete POOL_NAME --region REGION - Eliminar un grupo de workers.

Ejemplo de Creación

gcloud run worker-pools create my-worker-pool \
  --image us-central1-docker.pkg.dev/my-project/my-repo/my-worker-image:latest \
  --min-instances 2 \
  --max-instances 10 \
  --region us-central1 \
  --set-env-vars "QUEUE_URL=https://my-queue.googleapis.com"

Configuración General

  • Región: Especifica la región de Google Cloud donde se ejecuta el recurso. Si no se especifica, se usa la región por defecto configurada.
  • Plataforma: Para servicios, usar --platform managed para Cloud Run totalmente gestionado.
  • Variables de Entorno: Usar --set-env-vars o --update-env-vars para configurar variables.
  • Secretos: Usar --set-secrets=SECRET_NAME=SECRET_VERSION:env_var_name para montar secretos como variables de entorno.
  • Concurrencia: Para servicios, controla cuántas peticiones simultáneas puede manejar cada instancia.
  • Tiempo de Espera: Tiempo máximo que una petición (servicio) o tarea (trabajo) puede ejecutarse.
  • Memoria y CPU: Ajustar según las necesidades de tu aplicación.

Referencia

Individual skills in this repo

This repo contains 18 individual skills — each has its own dedicated page.

google/agent-platform-skill-registry

Interact with the Gemini Enterprise Agent Platform Skill Registry to create and search for available skills. Use this skill to enable agents to register functionality or discover new capabilities.

google/alloydb-basics

Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB model context protocol (MCP) tools for automated database operations.

google/bigquery-basics

Manages datasets, tables, and jobs in BigQuery, and integrates with BigQuery ML and Gemini for advanced data analytics and AI-driven insights. Use when you need to interact with BigQuery, run SQL queries, manage BigQuery resources, or leverage BigQuery's built-in ML capabilities. Also use when performing data analysis, ingesting data into BigQuery, or developing AI applications on BigQuery.

google/cloud-sql-basics

This file generates or explains Cloud SQL resources. Use this file when the user asks to create a Cloud SQL instance or database for MySQL, PostgreSQL, or SQL Server. Cloud SQL manages third-party MySQL, PostgreSQL, and SQL Server instances as resources in Cloud SQL. For example, when Cloud SQL creates an open-source MySQL instance, the resulting resource is a Cloud SQL for MySQL instance that Google Cloud manages. Cloud SQL handles backups, high availability, and secure connectivity for relational database workloads.

google/firebase-basics

Use this skill whenever you are working on a project that uses Firebase products or services, especially for mobile or web apps.

google/gemini-api

Use when the user asks about using Gemini in an enterprise environment or explicitly mentions Vertex AI, Google Cloud, or Agent Platform. Guides the usage of the Gemini API on Agent Platform with the Google Gen AI SDK. Covers SDK usage (Python, JS/TS, Go, Java, C#), capabilities like multimodal inputs, tools, media generation, caching, batch prediction, and Live API.

google/gemini-interactions-api

Guides the usage of Gemini Interactions API on Gemini Enterprise Agent Platform. Use when the user wants to use the stateful, server-managed Interactions API for multi-turn conversations, background execution, streaming, structured output, and function calling on the Agent Platform.

google/gke-basics

Plan, create, and configure production-ready Google Kubernetes Engine (GKE) clusters using the golden path Autopilot configuration. Covers Day-0 checklist, Autopilot vs Standard, networking (private clusters, VPC-native, Gateway API), security (Workload Identity, Secret Manager, RBAC hardening), observability, scaling, cost optimization, and AI/ML inference. WHEN: create GKE cluster, provision GKE environment, design GKE networking, secure GKE, optimize GKE cost, GKE autoscaling, GKE inference, GKE upgrade, GKE observability, GKE multi-tenancy, GKE batch, GKE HPC, GKE compute class.

google/google-cloud-networking-observability

Investigates Google Cloud networking issues by analyzing logs, metrics, and diagnostics. Use when investigating VPC Flow Logs (including cost estimation), NAT, firewall, or threat logs, querying latency and throughput metrics, or running Connectivity Tests for path diagnostics. Don't use for generic VM management or non-observability tasks.

google/google-cloud-recipe-auth

Provides expert guidance on authenticating and authorizing to Google Cloud services and APIs, covering human users, service identities, Application Default Credentials (ADC), and best practices for secure access.

google/google-cloud-recipe-networking-observability

Investigates Google Cloud networking issues by analyzing logs, metrics, and diagnostics. Use when investigating VPC Flow Logs, NAT, firewall, or threat logs, querying latency and throughput metrics, or running Connectivity Tests for path diagnostics.

google/google-cloud-recipe-onboarding

Guides a developer's first steps on Google Cloud, covering account creation, billing setup, project management, and deploying a first resource. Use when a new developer wants to initialize their first Google Cloud project, configure billing, and verify deployment. Don't use for enterprise organization setup (use Google Cloud Setup guided flow for that instead). Don't use for complex multi-project architectures.

google/google-cloud-waf-cost-optimization

Generates cost optimization guidance for Google Cloud workloads based on the Google Cloud Well-Architected Framework (WAF). Use this skill to evaluate a workload, identify cost requirements and constraints, and provide actionable recommendations for build, deploy, and manage the workload cost-efficiently in Google Cloud.

google/google-cloud-waf-operational-excellence

Generates operations-focused guidance for Google Cloud workloads based on the design principles and recommendations in the Operational Excellence pillar of the Google Cloud Well-Architected Framework (WAF). Use this skill to evaluate a workload, identify operational requirements, and provide actionable recommendations for deployment, monitoring, and incident management.

google/google-cloud-waf-performance-optimization

Generates performance-focused guidance for Google Cloud workloads based on the design principles and recommendations in the Performance Optimization pillar of the Google Cloud Well-Architected Framework (WAF). Use this skill to evaluate a workload, identify performance requirements, and provide actionable recommendations for resource allocation, modular design, and elasticity.

google/google-cloud-waf-reliability

Generates reliability-focused guidance for Google Cloud workloads based on the design principles and recommendations in the Google Cloud Well-Architected Framework. Use this skill to evaluate a workload, identify reliability requirements, and provide actionable recommendations for build, deploy, and manage the workload reliably in Google Cloud.

google/google-cloud-waf-security

Generates security-focused guidance for Google Cloud workloads based on the design principles and recommendations in the Google Cloud Well-Architected Framework (WAF). Use this skill to evaluate a workload, identify security requirements, and provide actionable recommendations for IAM, network security, data protection, and operational security.

google/google-cloud-waf-sustainability

Generates sustainability-focused guidance for Google Cloud workloads based on the design principles and recommendations in the Google Cloud Well-Architected Framework (WAF). Use this skill to evaluate a workload, identify environmental impact requirements, and provide actionable recommendations to build, deploy, and manage the workload sustainably in Google Cloud.

Skills relacionados