All Articles

Build a GitOps Pipeline with ArgoCD and Helm (2026 Project Walkthrough)

A complete GitOps setup with ArgoCD and Helm — from installing ArgoCD to auto-deploying your app when you push to Git.

DevOpsBoysApr 8, 20263 min read
Share:Tweet

GitOps means your Git repo is the source of truth. Push a change to Git — your cluster updates automatically. This walkthrough shows you how to build that with ArgoCD and Helm.


What You Will Build

Developer pushes to Git
         ↓
GitHub repo (Helm chart updated)
         ↓
ArgoCD detects drift
         ↓
ArgoCD applies changes to Kubernetes
         ↓
App updated — no kubectl apply needed

Prerequisites

  • Running Kubernetes cluster (minikube, kind, or cloud)
  • kubectl configured
  • Helm 3 installed
  • A GitHub account

Step 1: Install ArgoCD

bash
kubectl create namespace argocd
 
kubectl apply -n argocd -f \
  https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
 
# Wait for all pods to be running
kubectl get pods -n argocd -w

Access the ArgoCD UI:

bash
kubectl port-forward svc/argocd-server -n argocd 8080:443

Get the initial admin password:

bash
kubectl -n argocd get secret argocd-initial-admin-secret \
  -o jsonpath="{.data.password}" | base64 -d

Login at https://localhost:8080 with username admin.


Step 2: Create Your Helm Chart

Create a simple Helm chart for your app:

bash
helm create myapp

This generates:

myapp/
├── Chart.yaml
├── values.yaml
└── templates/
    ├── deployment.yaml
    ├── service.yaml
    └── ingress.yaml

Edit values.yaml:

yaml
replicaCount: 2
 
image:
  repository: nginx
  tag: "1.25"
  pullPolicy: IfNotPresent
 
service:
  type: ClusterIP
  port: 80
 
resources:
  requests:
    cpu: 100m
    memory: 128Mi
  limits:
    cpu: 200m
    memory: 256Mi

Step 3: Push Chart to GitHub

bash
# Create a new repo on GitHub: github.com/yourname/myapp-gitops
 
git init
git add .
git commit -m "initial helm chart"
git remote add origin https://github.com/yourname/myapp-gitops.git
git push -u origin main

Your repo structure:

myapp-gitops/
└── helm/
    └── myapp/
        ├── Chart.yaml
        ├── values.yaml
        └── templates/

Step 4: Create ArgoCD Application

Create argocd-app.yaml:

yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: myapp
  namespace: argocd
spec:
  project: default
 
  source:
    repoURL: https://github.com/yourname/myapp-gitops
    targetRevision: main
    path: helm/myapp
 
  destination:
    server: https://kubernetes.default.svc
    namespace: production
 
  syncPolicy:
    automated:
      prune: true      # delete resources removed from git
      selfHeal: true   # revert manual changes
    syncOptions:
      - CreateNamespace=true

Apply it:

bash
kubectl apply -f argocd-app.yaml

ArgoCD will now sync your app from Git to the cluster.


Step 5: Make a Change and Watch It Deploy

Update values.yaml — change the image tag:

yaml
image:
  repository: nginx
  tag: "1.26"    # changed from 1.25

Push to GitHub:

bash
git add .
git commit -m "update nginx to 1.26"
git push

ArgoCD detects the change within 3 minutes and applies it. Watch in the UI or:

bash
kubectl get pods -n production -w

You'll see new pods come up with the new image, old ones terminate.


Step 6: Separate Values Per Environment

Use different values files for dev/staging/production:

helm/myapp/
├── Chart.yaml
├── values.yaml              # defaults
├── values-staging.yaml     # staging overrides
└── values-production.yaml  # production overrides

values-production.yaml:

yaml
replicaCount: 5
image:
  tag: "1.26"
resources:
  requests:
    cpu: 500m
    memory: 512Mi

ArgoCD Application for production:

yaml
source:
  repoURL: https://github.com/yourname/myapp-gitops
  path: helm/myapp
  helm:
    valueFiles:
      - values.yaml
      - values-production.yaml

Verify Everything Works

bash
# Check ArgoCD sync status
kubectl get applications -n argocd
 
# Check app is running
kubectl get pods -n production
 
# Check sync history in ArgoCD UI
# Every Git commit becomes a deployable version

What to Add Next

  • Image Updater — ArgoCD Image Updater watches container registries and auto-updates image tags in Git
  • Secrets — Use Sealed Secrets or External Secrets Operator
  • Multi-cluster — One ArgoCD managing 10+ clusters
  • ApplicationSet — One template, multiple Applications (one per environment)

Resources

Newsletter

Stay ahead of the curve

Get the latest DevOps, Kubernetes, AWS, and AI/ML guides delivered straight to your inbox. No spam — just practical engineering content.

Related Articles

Comments