Skip to content
Back to skills

Cloud Run Deployment

ASecurity

Deploy and manage Google Cloud Run services with traffic management and scaling. PROACTIVELY activate for: (1) deploying containers to Cloud Run, (2) configuring blue-green or canary deployments, (3) managing traffic splits and rollbacks. Triggers: "cloud run", "deploy", "traffic split"

  • 76 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 8, 2026
devopsgobash

Security analysis

A96/100
  • mediumUses curl or wget to download content

Pro shows the line behind each finding and how to fix it

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill cloud-run-deployment --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cloud Run Deployment?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cloud Run Deployment
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-cloud-run-deployment/badge)](https://www.skillsdirectory.com/skills/majiayu000-cloud-run-deployment)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cloud-run-deployment
version: "1.0"
description: >
  Deploy and manage Google Cloud Run services with traffic management and scaling.
  PROACTIVELY activate for: (1) deploying containers to Cloud Run, (2) configuring blue-green or canary deployments, (3) managing traffic splits and rollbacks.
  Triggers: "cloud run", "deploy", "traffic split"
core-integration:
  techniques:
    primary: ["structured_decomposition"]
    secondary: []
  contracts:
    input: "none"
    output: "none"
  patterns: "none"
  rubrics: "none"
---

# Cloud Run Deployment Skill

## Metadata (Tier 1)

**Keywords**: cloud run, deploy, gcloud run, scaling, concurrency, health check, traffic split, blue-green, canary, revision

**File Patterns**: service.yaml, cloudrun.yaml, *-deployment.sh

**Modes**: cloud_run_dev, deployment

**Activation**: When user mentions Cloud Run deployment, service configuration, or traffic management.

---

## Instructions (Tier 2)

### Core Deployment Patterns

#### 1. Basic Deployment
```bash
gcloud run deploy SERVICE \
  --image=IMAGE_URL \
  --region=REGION \
  --service-account=SA_EMAIL \
  --no-allow-unauthenticated
```

#### 2. Blue-Green Deployment
Deploy new revision without traffic, validate, then switch:
```bash
# Deploy with --no-traffic
gcloud run deploy SERVICE --image=NEW_IMAGE --no-traffic --tag=blue

# Validate health check
curl -f https://blue---SERVICE-xxx.run.app/health

# Shift traffic
gcloud run services update-traffic SERVICE --to-tags=blue=100
```

#### 3. Canary Deployment
Gradual traffic shift:
```bash
# Deploy canary
gcloud run deploy SERVICE --image=NEW_IMAGE --no-traffic --tag=canary

# 10% traffic
gcloud run services update-traffic SERVICE \
  --to-revisions=CANARY_REV=10,LATEST=90

# Monitor, then increase to 50%, 100%
```

### Scaling Configuration

- **min-instances**: Set >0 for latency-sensitive (eliminates cold starts)
- **max-instances**: Limit to control costs
- **concurrency**: Default 80, tune based on workload (lower for CPU-intensive, higher for I/O)

```bash
gcloud run deploy SERVICE \
  --min-instances=2 \
  --max-instances=50 \
  --concurrency=80
```

### Health Checks (MANDATORY)

Use service.yaml for startup and liveness probes:

```yaml
spec:
  template:
    spec:
      containers:
      - startupProbe:
          httpGet:
            path: /health
            port: 8080
          initialDelaySeconds: 10
          periodSeconds: 5
          failureThreshold: 3
        livenessProbe:
          httpGet:
            path: /health
            port: 8080
          periodSeconds: 10
```

### Traffic Management

- **--to-latest**: Send 100% to latest revision
- **--to-tags=TAG=PERCENT**: Tag-based routing
- **--to-revisions=REV1=50,REV2=50**: Revision-based split

### Instant Rollback

```bash
PREVIOUS=$(gcloud run revisions list --service=SERVICE --limit=2 --format='value(metadata.name)' | tail -n 1)
gcloud run services update-traffic SERVICE --to-revisions=$PREVIOUS=100
```

### Anti-Patterns
- No health checks
- Direct to 100% traffic for critical services
- Using --allow-unauthenticated by default
- Ignoring startup probe failures

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…