| name | google-adk-deploy |
| description | 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. |
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
adk deploy cloud_run \
--project my-gcp-project \
--region us-central1 \
--service_name my-agent-service \
my_agent/
Manual 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
gcloud builds submit --tag gcr.io/my-project/my-agent
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
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:
from google.cloud import aiplatform
aiplatform.init(project="my-gcp-project", location="us-central1")
Deploy to GKE
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
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:
adk api_server my_agent/ --port 8080
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
GOOGLE_API_KEY=your-api-key
GOOGLE_CLOUD_PROJECT=my-project
GOOGLE_CLOUD_LOCATION=us-central1
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
Production Checklist
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