GitOps with ArgoCD: Your Infrastructure as Code, Actually
Implement GitOps principles using ArgoCD to manage Kubernetes deployments declaratively, with automatic sync, drift detection, and rollback capabilities.
February 11, 2026 · 8 min · 1579 words · Rob Washington
Table of Contents
GitOps takes “Infrastructure as Code” literally: your Git repository becomes the single source of truth for what should be running. ArgoCD watches your repo and automatically synchronizes your cluster to match. No more kubectl apply from laptops, no more “what’s actually deployed?” mysteries.
# sealed-secret.yaml (safe to commit)apiVersion:bitnami.com/v1alpha1kind:SealedSecretmetadata:name:api-secretsspec:encryptedData:db-password:AgBy8hCi...encrypted...
# Find the commit to revert togit log --oneline overlays/production/
# Revertgit revert HEAD
git push
# ArgoCD automatically syncs to the reverted state
Or use the ArgoCD CLI:
1
2
3
4
5
# List application historyargocd app history api-production
# Rollback to specific revisionargocd app rollback api-production 3
# Check application statusargocd app get api-production
# Watch for changesargocd app wait api-production --health
# List all applicationsargocd app list
One repo per team/domain — avoid monolithic GitOps repos
Separate app config from app code — different repos, different lifecycles
Use Kustomize or Helm — don’t copy-paste YAML across environments
Require PRs for production — branch protection + review
Enable auto-sync with self-heal — let ArgoCD maintain desired state
Monitor sync failures — alert when apps are OutOfSync
Use ApplicationSets — generate apps dynamically for multi-cluster/multi-tenant
GitOps transforms deployment from an imperative action (“deploy this”) to a declarative state (“this should be deployed”). The result is auditable, reproducible, and self-healing infrastructure.
📬 Get the Newsletter
Weekly insights on DevOps, automation, and CLI mastery. No spam, unsubscribe anytime.