Skip to content

ArgoCD

Basic commands

Login

argocd login <ARGOCD_SERVER> --insecure --username <USERNAME> --password <PASSWORD>

Logout

argocd logout

Get help

argocd help

Application commands

Create an application

argocd app create <APP_NAME> \
  --repo <REPO_URL> \
  --path <REPO_PATH> \
  --dest-namespace <NAMESPACE> \
  --dest-server <CLUSTER_URL> \
  --sync-policy <SYNC_POLICY>

Update an application

argocd app patch <APP_NAME> \
  -p '{"spec":{"source":{"path":"<NEW_REPO_PATH>"}}}'

Sync an application

argocd app sync <APP_NAME>

Get the status of an application

argocd app get <APP_NAME>

Delete an application

argocd app delete <APP_NAME>

Project commands

Create a project

argocd proj create <PROJECT_NAME> \
  --description <PROJECT_DESCRIPTION>

Update a project

argocd proj patch <PROJECT_NAME> \
  -p '{"metadata":{"annotations":{"<KEY>":"<VALUE>"}}}'

Get the status of a project

argocd proj get <PROJECT_NAME>

Delete a project

argocd proj delete <PROJECT_NAME>

Cluster commands

Add a cluster

argocd cluster add <CLUSTER_NAME> \
  --name <CLUSTER_ALIAS> \
  --server <CLUSTER_URL> \
  --insecure \
  --username <USERNAME> \
  --password <PASSWORD>

Update a cluster

argocd cluster patch <CLUSTER_NAME> \
  -p '{"config":{"tlsClientConfig":{"insecure":true}}}'

Get the status of a cluster

argocd cluster get <CLUSTER_NAME>

Delete a cluster

argocd cluster remove <CLUSTER_NAME>