$ command-helper

Argo CD (argocd CLI)

Logging in, application status and diff, sync and rollback, and the initial admin password.

Requires Google sign-in

Access

Initial admin password
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -d
Open the UI without an ingress
kubectl -n argocd port-forward svc/argocd-server 8080:443
Log in
argocd login <argocd_server> --username admin
Log in via SSO
argocd login <argocd_server> --sso

Applications

List applications with sync and health status
argocd app list
Application details and resources
argocd app get <argocd_app>
What will change on sync
argocd app diff <argocd_app>
Sync and wait until healthy
argocd app sync <argocd_app> && argocd app wait <argocd_app> --health --timeout 300
Sync a single resourceadvanced
argocd app sync <argocd_app> --resource apps:Deployment:<deployment>
Deployment history
argocd app history <argocd_app>
Roll back to a history IDadvanced
argocd app rollback <argocd_app> <history_id>

Auto-sync must be disabled first, or Argo CD will sync the app back to Git.

Refresh from Git ignoring cacheadvanced
argocd app get <argocd_app> --hard-refresh
Pause auto-syncadvanced
argocd app set <argocd_app> --sync-policy none

Clusters and repos

Registered clusters
argocd cluster list
Registered Git repositories
argocd repo list