← Back to all stories

Zero to GitOps: How ArgoCD Changed My Life

From manual kubectl applies to fully automated deployments. The journey, the pitfalls, and the sweet taste of GitOps nirvana.

"Just run kubectl apply." Those words used to be our deployment strategy. Then one day, someone ran the wrong manifest in production. That was the day I discovered GitOps.

🌑 The Dark Ages (Before GitOps)

Our deployment process was... creative:

  1. Developer pushes code to GitHub
  2. CI builds Docker image, pushes to registry
  3. Developer updates manifest locally
  4. Developer runs kubectl apply -f from their laptop
  5. Everyone prays
😱
The problems were endless:
  • No audit trail - who deployed what?
  • Drift - cluster state didn't match git
  • Rollbacks meant "find the old manifest somewhere"
  • Different kubectl configs on different laptops

🤔 Why ArgoCD?

I evaluated Flux, ArgoCD, and Jenkins X. ArgoCD won for us because of:

🎨

Beautiful UI

Visual representation of your deployments

🔄

Sync Policies

Auto-sync, self-heal, prune - all configurable

🔌

Multi-Cluster

One ArgoCD to rule all clusters

🎯

App of Apps

Bootstrap entire environments from git

🛠️ Setting Up ArgoCD

Installation is surprisingly simple:

Shell
# Create namespace
kubectl create namespace argocd

# Install ArgoCD
kubectl apply -n argocd -f \
  https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

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

Then create your first Application:

application.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: my-app
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://github.com/myorg/manifests
    targetRevision: HEAD
    path: apps/my-app
  destination:
    server: https://kubernetes.default.svc
    namespace: production
  syncPolicy:
    automated:
      prune: true
      selfHeal: true

📐 GitOps Patterns We Adopted

Pattern 1: App of Apps

One "root" Application that points to a directory containing other Application manifests. Bootstrap an entire cluster from a single git path.

Pattern 2: Environment Branches

We use branch-per-environment: main → production, staging → staging. Promoting is just a PR merge.

Pattern 3: Sealed Secrets

Secrets in git? Use Sealed Secrets or External Secrets Operator. We can now have everything in version control.

📈 The Results

After 6 months of GitOps with ArgoCD:

Metrics
Deployment frequency:     +300% (daily → multiple per day)
Lead time for changes:    -60% (hours → minutes)
Failed deployments:       -80%
Mean time to recovery:    -70% (git revert → instant rollback)
"kubectl apply" from laptops: 0 🎉
🏆
Best moment: A junior developer accidentally deleted a deployment. ArgoCD self-healed it within 3 minutes, automatically. No pages, no panic, no manual intervention.

GitOps isn't just a deployment strategy - it's peace of mind. Your cluster state is always in sync with git, rollbacks are a git revert away, and you have a complete audit trail of every change.

Ready to start your GitOps journey? Let me know what questions you have!

Share this story