argocd commands

27 commands, each with a one-line explanation. Click a command to copy it, or its title for details.

Commands 27 shown

  • argocd login argocd.example.com --username admin --password $(kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath='{.data.password}' | base64 -d)

    Authenticate argocd CLI using the initial admin secret

    kubectl

  • argocd app list

    Show all ArgoCD applications with sync/health status

  • argocd app sync myapp --prune

    Trigger sync and prune removed resources

  • argocd app get myapp --refresh

    Force ArgoCD to re-fetch manifests from Git

    debug

  • argocd app diff myapp

    Show what would change if the app were synced now

    debug

  • argocd app rollback myapp 3

    Rollback to revision 3 of the application history

  • 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

    Declaratively create an ArgoCD app with auto-sync

    ci

  • argocd app delete myapp --cascade=false

    Remove ArgoCD app object without deleting Kubernetes resources

  • argocd cluster add my-k8s-context

    Register an external cluster using a kubeconfig context

    kubectl

  • argocd cluster list

    Show all clusters managed by ArgoCD

  • argocd app set myapp --kustomize-image myapp=myregistry/myapp:v1.2.3

    Override container image for a Kustomize app without changing Git

    kustomize

  • argocd app set myapp --sync-policy none

    Disable automated sync for manual control

  • argocd app resources myapp

    List all Kubernetes resources managed by an app

    debug

  • argocd app wait myapp --sync --health --timeout 120

    Block until app is synced and healthy (CI use case)

    ci

  • argocd proj create myproject --description 'Production apps' --dest 'https://kubernetes.default.svc,prod' --src 'https://github.com/org/*'

    Isolate apps in a project with source/destination restrictions

    security

  • argocd app set <name> --helm-set image.tag=v2 --helm-set replicaCount=3

    Override Helm values live without touching Git; note: drifts from source until committed

    gitops · k8s · troubleshooting

  • argocd app set <name> -p key=val -p env=prod

    Set Kustomize/Helm parameter overrides via -p; modern: prefer Git-tracked overlays for audit

    gitops · k8s

  • argocd app manifests <name> | kubectl diff -f -

    Diff Argo-rendered manifests against live cluster state before syncing

    gitops · troubleshooting · debug

  • argocd appset list && argocd appset get <name> -o yaml

    List/get ApplicationSets and their generated child apps and generators

    gitops · k8s

  • argocd repo add https://git.example.com/repo.git --username <id> --password $TOKEN

    Register HTTPS repo with creds; modern: --ssh-private-key-path for SSH-based access

    gitops · secrets · security

  • argocd app patch <name> --patch '{"spec":{"source":{"targetRevision":"v2.1"}}}' --type merge

    Merge-patch app spec without editing the CR; useful to bump targetRevision fast

    gitops · k8s · troubleshooting

  • argocd app terminate-op <name>

    Cancel an in-progress sync stuck on a hook or pending resource

    troubleshooting · debug · k8s

  • argocd app actions run <name> restart --kind Deployment --resource-name <id>

    Trigger a Deployment rollout restart through Argo's resource actions

    k8s · troubleshooting

  • argocd proj windows add <name> --kind deny --schedule '0 0 * * *' --duration 8h --applications '*'

    Create a deny sync window to freeze deploys during off-hours; cron-based schedule

    gitops · ci · security

  • argocd app set <name> --sync-option Prune=true --sync-option ServerSideApply=true

    Set sync options for safe prune and SSA; note: SSA fixes large-CRD apply conflicts

    gitops · k8s

  • argocd admin export -n argocd > argo-backup.yaml # restore: argocd admin import -n argocd - < argo-backup.yaml

    Export/import all apps, projects and settings for DR; cluster-secret aware

    gitops · secrets · k8s

  • argocd app sync <name> --resource apps:Deployment:<id>

    Sync only one resource by group:kind:name; isolates a fix without full app sync

    gitops · troubleshooting · k8s