Skip to main content

Overview

ArgoCD enables GitOps-based continuous delivery for MCP Server, automatically syncing Kubernetes resources from Git to multiple GKE clusters. Changes in Git trigger automated deployments with rollback capabilities.

Multi-Cluster

Manage dev, staging, prod from one ArgoCD instance

Auto-Sync

Git commits trigger automated deployments

Image Updater

Auto-update images from Artifact Registry

Workload Identity

Keyless authentication with GCP

GitOps Benefits

Git is the authoritative source for all deployments.
  • No manual kubectl apply
  • Full audit trail (Git history)
  • Easy rollback (git revert)
ArgoCD watches Git and auto-syncs to clusters.
  • Merge PR → Automatic deployment
  • Reduced manual errors
  • Consistent across environments
One ArgoCD instance manages all clusters.
  • Dev, staging, prod from single UI
  • ApplicationSets for environment parity
  • Centralized observability
ArgoCD Image Updater detects new images.
  • Monitors Artifact Registry
  • Creates PRs with new image tags
  • Semantic versioning support

Architecture

Flow:
  1. Developer pushes code → GitHub
  2. CI/CD builds image → Artifact Registry
  3. ArgoCD Image Updater detects new image
  4. Creates PR with updated image tag
  5. After PR merge, ArgoCD syncs to cluster

Quick Setup (15 minutes)

1

Run Setup Script

What it does:
  • Installs ArgoCD in argocd namespace
  • Installs ArgoCD Image Updater
  • Configures Workload Identity
  • Sets up GCP service account with registry access
2

Get ArgoCD Admin Password

Copy the password for login.
3

Access ArgoCD UI

Open: https://localhost:8080Login:
  • Username: admin
  • Password: (from Step 2)
4

Add GKE Clusters

5

Deploy ApplicationSet

Creates 3 Applications (dev, staging, prod) from one definition.
6

Verify Sync

All apps should show Synced and Healthy

ApplicationSet for Multi-Environment

Configuration

Sync Policies


ArgoCD Image Updater

Purpose

Automatically update container image tags when new versions are pushed to Artifact Registry.

Configuration

1

Configure Registry Access

argocd-image-updater-config.yaml
Workload Identity handles authentication automatically.
2

Annotate Application

3

Update Strategy Options

Workflow


Deployment Patterns

Progressive Delivery

1

1. Deploy to Dev (Automatic)

ArgoCD auto-syncs to dev cluster within 3 minutes.
2

2. Promote to Staging (Manual Sync)

Validates in production-like environment.
3

3. Promote to Production (Approval Required)

.github/workflows/promote-to-prod.yaml
Requires manual approval in GitHub.

Canary Deployment

Use Flagger with ArgoCD for automated canary analysis:
Flow:
  1. ArgoCD syncs new version
  2. Flagger creates canary deployment (10% traffic)
  3. Monitors metrics for 1 minute
  4. If healthy, increases to 20%, 30%, … 100%
  5. If unhealthy, auto-rollback

Monitoring & Troubleshooting

Application Health

Common Issues

Symptom: Application shows “Progressing” for >10 minutesCauses:
  • Deployment rollout waiting for pods
  • Resource quota exceeded
  • Image pull errors
Solution:
Symptom: App shows “OutOfSync” with automated sync enabledCauses:
  • Manual kubectl changes (selfHeal disabled)
  • Ignored differences (e.g., replicas managed by HPA)
  • Sync failed due to error
Solution:
Symptom: New images pushed to Artifact Registry, but no PR createdChecks:
Common fix: Grant roles/artifactregistry.reader to GCP SA
Symptom: ArgoCD can’t connect to GKE clusterSolution:

Security Best Practices

Enable RBAC for ArgoCD users
Use Workload Identity (no service account keys)
Already configured by setup script.
Enable audit logging
Restrict allowed Git repos

GKE Production

Production deployment with Kustomize overlays

Binary Authorization

Image signing for secure deployments

CI/CD Pipeline

GitHub Actions workflow with ArgoCD

Operations Runbooks

Incident response and troubleshooting

Next Steps

1

Install ArgoCD

2

Add Clusters

3

Deploy ApplicationSet

4

Configure Image Updater

Add annotations to Application for automatic image updates
5

Enable Monitoring