argocd
27 commands
27 shown
Login to ArgoCD
Authenticate argocd CLI using the initial admin secret
argocd login argocd.example.com --username admin --password $(kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath='{.data.password}' | base64 -d)
List all applications
Show all ArgoCD applications with sync/health status
argocd app list
Sync an application
Trigger sync and prune removed resources
argocd app sync myapp --prune
Force refresh (bypass cache)
Force ArgoCD to re-fetch manifests from Git
argocd app get myapp --refresh
Show app diff vs cluster
Show what would change if the app were synced now
argocd app diff myapp
Rollback to previous version
Rollback to revision 3 of the application history
argocd app rollback myapp 3
Create application from CLI
Declaratively create an ArgoCD app with auto-sync
argocd app create myapp --repo https://github.com/org/repo --path k8s/prod --dest-server https://kubernetes.default.svc --dest-namespace default --sync-policy automated
Delete application (keep resources)
Remove ArgoCD app object without deleting Kubernetes resources
argocd app delete myapp --cascade=false
Add cluster to ArgoCD
Register an external cluster using a kubeconfig context
argocd cluster add my-k8s-context
List registered clusters
Show all clusters managed by ArgoCD
argocd cluster list
Set image override
Override container image for a Kustomize app without changing Git
argocd app set myapp --kustomize-image myapp=myregistry/myapp:v1.2.3
Pause auto-sync
Disable automated sync for manual control
argocd app set myapp --sync-policy none
View application resources
List all Kubernetes resources managed by an app
argocd app resources myapp
Watch sync status
Block until app is synced and healthy (CI use case)
argocd app wait myapp --sync --health --timeout 120
Create project with RBAC
Isolate apps in a project with source/destination restrictions
argocd proj create myproject --description 'Production apps' --dest 'https://kubernetes.default.svc,prod' --src 'https://github.com/org/*'
Override Helm value at sync
Override Helm values live without touching Git; note: drifts from source until committed
argocd app set <name> --helm-set image.tag=v2 --helm-set replicaCount=3
Set plain parameter override
Set Kustomize/Helm parameter overrides via -p; modern: prefer Git-tracked overlays for audit
argocd app set <name> -p key=val -p env=prod
Diff rendered manifests vs cluster
Diff Argo-rendered manifests against live cluster state before syncing
argocd app manifests <name> | kubectl diff -f -
Inspect ApplicationSet
List/get ApplicationSets and their generated child apps and generators
argocd appset list && argocd appset get <name> -o yaml
Add private repo with credentials
Register HTTPS repo with creds; modern: --ssh-private-key-path for SSH-based access
argocd repo add https://git.example.com/repo.git --username <id> --password $TOKEN
Patch app spec inline
Merge-patch app spec without editing the CR; useful to bump targetRevision fast
argocd app patch <name> --patch '{"spec":{"source":{"targetRevision":"v2.1"}}}' --type merge
Terminate stuck sync operation
Cancel an in-progress sync stuck on a hook or pending resource
argocd app terminate-op <name>
Run resource restart action
Trigger a Deployment rollout restart through Argo's resource actions
argocd app actions run <name> restart --kind Deployment --resource-name <id>
Add project sync window
Create a deny sync window to freeze deploys during off-hours; cron-based schedule
argocd proj windows add <name> --kind deny --schedule '0 0 * * *' --duration 8h --applications '*'
Enable prune and server-side apply
Set sync options for safe prune and SSA; note: SSA fixes large-CRD apply conflicts
argocd app set <name> --sync-option Prune=true --sync-option ServerSideApply=true
Backup all Argo objects
Export/import all apps, projects and settings for DR; cluster-secret aware
argocd admin export -n argocd > argo-backup.yaml # restore: argocd admin import -n argocd - < argo-backup.yaml
Partial sync of single resource
Sync only one resource by group:kind:name; isolates a fix without full app sync
argocd app sync <name> --resource apps:Deployment:<id>
no commands match