This repository provides a reference implementation for deploying a Google ADK (Agent Development Kit) Agent to Google Kubernetes Engine (GKE).
The sample agent uses the Gemini 2.5 Flash model to answer questions about time and weather in specified cities, demonstrating Agent-to-Agent (A2A) communication protocols.
- ADK Agent: Built with
google-adk, utilizing function calling (tools) for weather and time. - GKE Autopilot: Deploys to a fully managed Kubernetes environment.
- Secure Access: Configures a Global Static IP and Google-managed SSL Certificate for secure A2A communication.
- Automated Workflow: Includes a
Makefilefor streamlined infrastructure setup, building, and deployment.
- Google Cloud SDK (
gcloud) - Helm
- uv (Python package manager)
- Make
Initialize the configuration file and edit it with your environment details:
make init-configAction Required: Open
config.yamland replace all placeholders (e.g.,your-gcp-project-id,your-region,your-a2a-host) with your actual values.
Provision the necessary Google Cloud resources. You can run these commands sequentially to set up the environment:
# Create Artifact Registry for storing images
make create-artifact-registry
# Create GKE Autopilot Cluster
make create-gke-cluster
# Reserve a Global Static IP
make create-static-ip
# Provision a Managed SSL Certificate
make create-managed-certificateBuild the container image and deploy the Helm chart:
# Submit build to Cloud Build
make build
# Deploy to GKE
make deployNote: The deployment uses the Global Static IP and Managed Certificate created in step 2. SSL certificate provisioning by Google can take 15-60 minutes to become active.
Crucial Step: After the initial deployment, authorize the Kubernetes Service Account to access Vertex AI:
make grant-iam-roleThis step links the Kubernetes Service Account to the Google Cloud Service Account, allowing the agent to invoke the Gemini model.
- Automated Test: Run the automated test to check if the agent card is reachable:
make test - Agent Card (Manual): Visit your agent's endpoint to manually inspect its capability card:
https://<YOUR_A2A_HOST>/.well-known/agent-card.json - A2A Inspector: Validate and test the agent using the A2A Inspector tool.
Once deployed and verified, you can register your agent with Gemini Enterprise.
Run the agent locally for rapid testing:
- Authenticate: Ensure you have credentials for Vertex AI:
gcloud auth application-default login
- Run:
make run
Access the local agent card at: http://localhost:8000/.well-known/agent-card.json
To uninstall the Helm chart and remove the application from your cluster:
make undeployTo completely remove all infrastructure resources created by this project (GKE cluster, Static IP, SSL Certificate, Artifact Registry):
make destroy