🎉 DevOps Interview Prep Bundle is live — 1000+ Q&A across 20 topicsGet it →
All Cheatsheets

ArgoCD Cheatsheet

ArgoCD CLI and UI commands for managing GitOps deployments — apps, sync, rollback, RBAC, and troubleshooting.

7 sections52 commandsClick any row to copy

Login & Context

argocd login argocd.example.com --username admin --password <pass>
argocd login argocd.example.com --sso
argocd login localhost:8080 --insecure
kubectl port-forward svc/argocd-server -n argocd 8080:443
argocd context
argocd version
kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath='{.data.password}' | base64 -d

Login to ArgoCD server

Login using SSO (opens browser)

Login to local ArgoCD (skip TLS verification)

Access ArgoCD UI locally

Show current ArgoCD context

Show ArgoCD CLI and server versions

Get initial admin password

App Management

argocd app list
argocd app get my-app
argocd app create my-app \ --repo https://github.com/org/repo \ --path k8s/overlays/prod \ --dest-server https://kubernetes.default.svc \ --dest-namespace production
argocd app delete my-app
argocd app delete my-app --cascade
argocd app set my-app --sync-policy automated
argocd app set my-app --auto-prune
argocd app set my-app --self-heal
argocd app logs my-app

List all applications with sync and health status

Detailed app status, sync state, and resources

Create new ArgoCD application

Delete application (keeps K8s resources)

Delete app and all its K8s resources

Enable auto-sync for an app

Enable auto-pruning of removed resources

Enable self-healing (revert manual changes)

Stream logs from app pods

Sync & Diff

argocd app sync my-app
argocd app sync my-app --prune
argocd app sync my-app --dry-run
argocd app sync my-app --force
argocd app sync my-app --resource apps:Deployment:my-deployment
argocd app diff my-app
argocd app diff my-app --local ./k8s/
argocd app wait my-app --health
argocd app wait my-app --sync
argocd app wait my-app --timeout 120

Trigger immediate sync

Sync and delete resources removed from git

Preview what sync would do (no changes)

Force sync even if already in sync

Sync only a specific resource

Show diff between live state and desired state

Diff against local directory

Wait until app is healthy

Wait until app is synced

Wait up to 120 seconds

Rollback & History

argocd app history my-app
argocd app rollback my-app 3
argocd app rollback my-app --revision abc1234
argocd app set my-app --revision v1.2.3
argocd app set my-app --revision HEAD

List sync history with revision IDs

Rollback to history ID 3

Rollback to specific git commit

Pin app to a specific git tag or commit

Reset to track latest HEAD

Repositories & Clusters

argocd repo list
argocd repo add https://github.com/org/repo --username git --password token
argocd repo add https://charts.helm.sh/stable --type helm --name stable
argocd repo remove https://github.com/org/repo
argocd cluster list
argocd cluster add my-context
argocd cluster info https://my-cluster-api

List connected repositories

Add a private git repo

Add a Helm repository

Remove a repository

List registered clusters

Register a cluster from kubeconfig context

Show cluster details

ApplicationSet & Projects

argocd proj list
argocd proj get my-project
argocd proj create my-project \ --src-repo https://github.com/org/repo \ --dest-namespace production \ --dest-server https://kubernetes.default.svc
argocd proj allow-cluster-resource my-project '*' '*'
argocd appset list
argocd appset get my-appset

List all AppProjects

Show project details and policies

Create a new project

Allow all cluster-scoped resources in project

List ApplicationSets

Show ApplicationSet details

Troubleshooting

argocd app conditions my-app
argocd app resources my-app
kubectl get pods -n argocd
kubectl logs -n argocd deployment/argocd-application-controller
kubectl logs -n argocd deployment/argocd-repo-server
kubectl logs -n argocd deployment/argocd-server
argocd app terminate-op my-app
kubectl patch app my-app -n argocd -p '{"operation": null}' --type merge

Show app conditions (errors, warnings)

List all K8s resources managed by app

Check ArgoCD component pods health

ArgoCD controller logs (sync engine)

Repo server logs (git clone, manifest gen)

API server logs

Cancel an in-progress sync operation

Force clear stuck operation