← All insightsCheat Sheet

Argo CD cheat sheet: the complete command reference

CodeWizard Engineering · 15 June 2026 · 3 min read · Beginner

This is a complete, hands-on Argo CD cheat sheet: install, configure, operate, automate and secure it - with copy-paste commands grouped by task. Bookmark it for day-to-day work, incidents and interviews alike.

Argo CD is a Kubernetes controller that continuously compares the live cluster to manifests in Git and syncs any drift, giving you declarative, auditable, self-healing deployments.

Why you reach for it

  • Git becomes the single source of truth for what runs in the cluster
  • Automatic drift detection and self-healing back to the declared state
  • A clear UI and history of every sync, with one-click rollback

Installation

bash
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl -n argocd get pods

Configuration reference

An Application that tracks a Git path and self-heals.

yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata: { name: web, namespace: argocd }
spec:
  project: default
  source:
    repoURL: https://github.com/acme/deploy.git
    targetRevision: main
    path: apps/web
  destination:
    server: https://kubernetes.default.svc
    namespace: web
  syncPolicy:
    automated: { prune: true, selfHeal: true }
    syncOptions: [CreateNamespace=true]

Core commands you use daily

bash
argocd app sync web
argocd app get web
argocd app history web
argocd app rollback web 3

App lifecycle

bash
argocd login argocd.acme.io
argocd app create web --repo https://github.com/acme/deploy --path apps/web --dest-server https://kubernetes.default.svc --dest-namespace web
argocd app sync web
argocd app diff web
argocd app history web
argocd app rollback web 3

Repos & clusters

bash
argocd repo add https://github.com/acme/deploy --username git --password $TOKEN
argocd cluster add prod-context
argocd app list

Use it in CI/CD

CI only updates the image tag in Git; Argo CD does the deploy.

yaml
bump-image:
  script:
    - yq -i '.image.tag = strenv(CI_COMMIT_SHA)' apps/web/values.yaml
    - git commit -am "web $CI_COMMIT_SHA" && git push

Best-practice checklist

  • Adopt app-of-apps to manage many Applications declaratively
  • Enable selfHeal + prune so the cluster always matches Git
  • Use Sealed Secrets/SOPS so secrets can live safely in Git

Common pitfalls to avoid

  • Letting people kubectl apply straight to the cluster, causing endless drift
  • Auto-sync without prune, leaving orphaned resources behind
  • Storing plaintext secrets in the Git repo

Security quick wins

  • Scope Argo CD RBAC per project and team
  • Encrypt secrets (SOPS/Sealed Secrets) rather than committing plaintext

Works well with

  • Kubernetes - Declarative orchestration for containers at scale - self-healing, rolling updates and service discovery.
  • Flux CD - A CNCF GitOps toolkit that reconciles Kubernetes from Git, Helm and OCI sources.
  • Helm - The package manager for Kubernetes - template, version and release your manifests as charts.
A cheat sheet is muscle memory on paper - keep it close until the commands live in your fingers.

Want senior help putting Argo CD to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult