ArgoCD Cheatsheet
ArgoCD CLI and UI commands for managing GitOps deployments — apps, sync, rollback, RBAC, and troubleshooting.
Login & Context
argocd login argocd.example.com --username admin --password <pass>Login to ArgoCD server
argocd login argocd.example.com --ssoLogin using SSO (opens browser)
argocd login localhost:8080 --insecureLogin to local ArgoCD (skip TLS verification)
kubectl port-forward svc/argocd-server -n argocd 8080:443Access ArgoCD UI locally
argocd contextShow current ArgoCD context
argocd versionShow ArgoCD CLI and server versions
kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath='{.data.password}' | base64 -dGet initial admin password
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 listList all applications with sync and health status
argocd app get my-appDetailed app status, sync state, and resources
argocd app create my-app \
--repo https://github.com/org/repo \
--path k8s/overlays/prod \
--dest-server https://kubernetes.default.svc \
--dest-namespace productionCreate new ArgoCD application
argocd app delete my-appDelete application (keeps K8s resources)
argocd app delete my-app --cascadeDelete app and all its K8s resources
argocd app set my-app --sync-policy automatedEnable auto-sync for an app
argocd app set my-app --auto-pruneEnable auto-pruning of removed resources
argocd app set my-app --self-healEnable self-healing (revert manual changes)
argocd app logs my-appStream logs from app pods
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-appTrigger immediate sync
argocd app sync my-app --pruneSync and delete resources removed from git
argocd app sync my-app --dry-runPreview what sync would do (no changes)
argocd app sync my-app --forceForce sync even if already in sync
argocd app sync my-app --resource apps:Deployment:my-deploymentSync only a specific resource
argocd app diff my-appShow diff between live state and desired state
argocd app diff my-app --local ./k8s/Diff against local directory
argocd app wait my-app --healthWait until app is healthy
argocd app wait my-app --syncWait until app is synced
argocd app wait my-app --timeout 120Wait up to 120 seconds
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-appList sync history with revision IDs
argocd app rollback my-app 3Rollback to history ID 3
argocd app rollback my-app --revision abc1234Rollback to specific git commit
argocd app set my-app --revision v1.2.3Pin app to a specific git tag or commit
argocd app set my-app --revision HEADReset to track latest 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 listList connected repositories
argocd repo add https://github.com/org/repo --username git --password tokenAdd a private git repo
argocd repo add https://charts.helm.sh/stable --type helm --name stableAdd a Helm repository
argocd repo remove https://github.com/org/repoRemove a repository
argocd cluster listList registered clusters
argocd cluster add my-contextRegister a cluster from kubeconfig context
argocd cluster info https://my-cluster-apiShow cluster details
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 listList all AppProjects
argocd proj get my-projectShow project details and policies
argocd proj create my-project \
--src-repo https://github.com/org/repo \
--dest-namespace production \
--dest-server https://kubernetes.default.svcCreate a new project
argocd proj allow-cluster-resource my-project '*' '*'Allow all cluster-scoped resources in project
argocd appset listList ApplicationSets
argocd appset get my-appsetShow ApplicationSet details
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-appShow app conditions (errors, warnings)
argocd app resources my-appList all K8s resources managed by app
kubectl get pods -n argocdCheck ArgoCD component pods health
kubectl logs -n argocd deployment/argocd-application-controllerArgoCD controller logs (sync engine)
kubectl logs -n argocd deployment/argocd-repo-serverRepo server logs (git clone, manifest gen)
kubectl logs -n argocd deployment/argocd-serverAPI server logs
argocd app terminate-op my-appCancel an in-progress sync operation
kubectl patch app my-app -n argocd -p '{"operation": null}' --type mergeForce clear stuck operation
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