# Google Adk Deploy

> Deploy ADK agents to Cloud Run, Vertex AI Agent Engine, or GKE. Use when containerizing and deploying agents for production — covers Dockerfile, adk deploy CLI, and service configuration.

- Skill: `eagleisbatman/google-adk-deploy` (Agent Skill)
- Install (CLI): `npx skillmds@latest add eagleisbatman/google-adk-deploy`
- Raw SKILL.md: https://api.skillmd.com/api/skills/eagleisbatman/google-adk-deploy/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: eagleisbatman (https://skillmd.com/u/eagleisbatman)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/eagleisbatman/google-adk-deploy

---


# Google ADK — Deployment

## Deployment Targets

| Target | Best For | Managed |
|--------|----------|---------|
| Cloud Run | Serverless, auto-scaling | Semi-managed |
| Vertex AI Agent Engine | Fully managed, enterprise | Fully managed |
| GKE | Custom infrastructure | Self-managed |

## Deploy to Cloud Run

### Using ADK CLI

```bash
# Deploy directly (builds and deploys)
adk deploy cloud_run \
  --project my-gcp-project \
  --region us-central1 \
  --service_name my-agent-service \
  my_agent/
```

### Manual Dockerfile

```dockerfile
FROM python:3.11-slim

WORKDIR /app

COPY pyproject.toml .
COPY my_agent/ ./my_agent/

RUN pip install google-adk

EXPOSE 8080

CMD ["adk", "api_server", "--port", "8080", "my_agent/"]
```

### Build and Deploy

```bash
# Build container
gcloud builds submit --tag gcr.io/my-project/my-agent

# Deploy to Cloud Run
gcloud run deploy my-agent-service \
  --image gcr.io/my-project/my-agent \
  --region us-central1 \
  --allow-unauthenticated \
  --set-env-vars "GOOGLE_API_KEY=your-key"
```

## Deploy to Vertex AI Agent Engine

### Using ADK CLI

```bash
adk deploy agent_engine \
  --project my-gcp-project \
  --region us-central1 \
  --display-name "My Agent" \
  my_agent/
```

### Programmatic Deployment

For programmatic Vertex AI deployment, use the Google Cloud AI Platform SDK:

```python
from google.cloud import aiplatform

aiplatform.init(project="my-gcp-project", location="us-central1")

# Use the ADK CLI for the actual deployment
# Programmatic deployment is handled via adk deploy CLI
```

## Deploy to GKE

### Dockerfile

```dockerfile
FROM python:3.11-slim

WORKDIR /app
COPY . .
RUN pip install google-adk

EXPOSE 8080
CMD ["adk", "api_server", "--host", "0.0.0.0", "--port", "8080", "."]
```

### Kubernetes Deployment

```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: adk-agent
spec:
  replicas: 3
  selector:
    matchLabels:
      app: adk-agent
  template:
    metadata:
      labels:
        app: adk-agent
    spec:
      containers:
        - name: agent
          image: gcr.io/my-project/my-agent:latest
          ports:
            - containerPort: 8080
          env:
            - name: GOOGLE_API_KEY
              valueFrom:
                secretKeyRef:
                  name: agent-secrets
                  key: api-key
          resources:
            requests:
              memory: "512Mi"
              cpu: "250m"
---
apiVersion: v1
kind: Service
metadata:
  name: adk-agent-service
spec:
  selector:
    app: adk-agent
  ports:
    - port: 80
      targetPort: 8080
  type: LoadBalancer
```

## API Server (Production Mode)

The `adk api_server` command starts a FastAPI server:

```bash
# Local testing
adk api_server my_agent/ --port 8080

# Production (in container)
adk api_server --host 0.0.0.0 --port 8080 my_agent/
```

### API Endpoints

| Endpoint | Method | Description |
|----------|--------|-------------|
| `/apps/{app}/users/{user}/sessions` | POST | Create session |
| `/apps/{app}/users/{user}/sessions/{session}` | GET | Get session |
| `/run` | POST | Run agent (single turn) |
| `/run_sse` | POST | Run agent (streaming SSE) |

## Environment Variables for Deployment

```bash
# Gemini API (simple)
GOOGLE_API_KEY=your-api-key

# Vertex AI (service account)
GOOGLE_CLOUD_PROJECT=my-project
GOOGLE_CLOUD_LOCATION=us-central1
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
```

## Production Checklist

- [ ] Use `DatabaseSessionService` or `VertexAiSessionService` (not InMemory)
- [ ] Set up proper authentication (API keys, IAM)
- [ ] Configure memory service for cross-session recall
- [ ] Set resource limits (CPU, memory)
- [ ] Enable health checks
- [ ] Set up logging/monitoring (OpenTelemetry)
- [ ] Use secrets manager for API keys (not env vars in plain text)
- [ ] Configure auto-scaling rules

## Key Rules

- `adk api_server` is the production entry point (FastAPI-based)
- Cloud Run is simplest for serverless deployment
- Vertex AI Agent Engine is fully managed but less customizable
- Always use persistent session services in production
- Never expose `GOOGLE_API_KEY` in container images — use secrets

## Related Skills

- `google-adk-app` — App pattern (production configuration)
- `google-adk-scaffold` — Project structure
- `google-adk-a2a` — Deploying A2A-compatible agents

