GCP Configuration Guide
This guide explains how to configure Google Cloud Platform (GCP) settings for CI/CD deployment workflows.Overview
The deployment workflows (deploy-staging-gke.yaml, deploy-production-gke.yaml) require GCP configuration for:
- Authentication: Workload Identity Federation (keyless authentication)
- Resource Access: GKE clusters, Artifact Registry, Cloud Logging
- Deployment: Kubernetes manifest application via kubectl/Kustomize
Prerequisites
- GCP project with billing enabled
gcloudCLI installed and authenticated- Repository admin access to configure GitHub secrets
- Permissions to create service accounts and configure Workload Identity
Quick Setup (Automated Script)
We provide an automated setup script for convenience:Manual Setup
Step 1: Set Environment Variables
Step 2: Enable Required APIs
Step 3: Create Service Account
Step 4: Configure Workload Identity Federation
Step 5: Create GKE Clusters
Staging Cluster
Production Cluster
Step 6: Create Artifact Registry
GitHub Secrets Configuration
Required Secrets
Configure the following secrets in your GitHub repository settings (Settings → Secrets and variables → Actions):
| Secret Name | Value | Description |
|---|---|---|
GCP_PROJECT_ID | your-gcp-project-id | Your GCP project ID |
GCP_PROJECT_NUMBER | 123456789012 | Your GCP project number |
GCP_REGION | us-central1 | GCP region for resources |
GCP_WORKLOAD_IDENTITY_PROVIDER | projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/github-actions-pool/providers/github-provider | Workload Identity Provider path |
GCP_SERVICE_ACCOUNT | github-actions-deployer@PROJECT_ID.iam.gserviceaccount.com | Service account email |
GKE_STAGING_CLUSTER | staging-mcp-server-langgraph-gke | Staging GKE cluster name |
GKE_PRODUCTION_CLUSTER | production-mcp-server-langgraph-gke | Production GKE cluster name |
How to Get Values
Update Workflow Files
Once secrets are configured, update the workflow files to use them:deploy-staging-gke.yaml
deploy-production-gke.yaml
Verification
Test Authentication
Test Deployment
Trigger a manual workflow run to test:Troubleshooting
Common Issues
1. “Permission denied” during deployment
Cause: Service account lacks required permissions. Solution:2. “Workload Identity Provider not found”
Cause: Incorrect provider path or pool not created. Solution:3. “Cluster not found”
Cause: Cluster name mismatch or wrong region. Solution:Security Best Practices
1. Principle of Least Privilege
Grant only necessary permissions:2. Separate Environments
Use different service accounts for staging vs production:3. Audit Logging
Enable audit logs for service account activity:4. Conditional Access
Limit Workload Identity to specific branches:Cost Optimization
1. Use Preemptible Nodes (Staging)
2. Enable Cluster Autoscaling
Already enabled in cluster creation. Monitor usage:3. Use Artifact Registry Lifecycle Policies
Monitoring & Alerts
Setup Budget Alerts
View Deployment Logs
Automated Setup Script
Createscripts/setup/configure-gcp-cicd.sh:
Next Steps
- Configure GitHub Secrets - Add all required secrets to repository
- Update Workflow Files - Replace hardcoded values with
${{ secrets.* }} - Test Staging Deployment - Trigger manual workflow run
- Configure Production - Set up production environment protection
- Monitor Costs - Review GCP billing dashboard weekly
References
Last Updated: 2025-11-02 Maintained By: CI/CD Team