Guide · Argo CD · about 8 minutes

Argo CD cheatsheet: commands by task

Every command and pattern from the Argo CD and Helm track on one page, grouped by the job you're doing: the cluster, the argocd command, Applications, sync policies, Helm charts, environments, app-of-apps, rolling back, secrets and rebuilding. Plus what Argo CD's statuses and common errors mean. Each row links to the lesson that explains it.

Last checked November 2026

How to use this page

Find the job you're trying to do, and copy the pattern. Words in capitals, like APP, NAMESPACE or FILE, are yours to replace. Every row links to the lesson that explains it, with real output from the practice cluster. Use the print button at the top to keep a copy next to you.

Three habits that make everything here easier:

  • Change Git, not the cluster. With self-heal on, a change made with kubectl or argocd app set is undone within seconds. A branch, a commit and a pull request is how anything changes, including a rollback.
  • Refresh instead of waiting. Argo CD checks Git on a timer, every few minutes. argocd app get APP --refresh checks now.
  • Synced isn't working, and Healthy isn't right. Synced means the cluster matches Git. Healthy means the pods are running and answering. Neither can tell you the page is correct: look at it.

When Argo CD says no

Start here when something's wrong. Match the message or the symptom, then look where it says.

The message or symptomIt meansLook atLesson
Failed to establish connection to localhost:8080 ... connection refused, from argocdThe port-forward isn't running, so the argocd command can't reach the serverStart kubectl port-forward svc/argocd-server -n argocd 8080:443 in its own terminal, then log in again2, 10
The connection to the server localhost:8080 was refused, from kubectlkubectl has no cluster to talk to: the cluster is deleted or stopped. It falls back to that addresskind get clusters, docker start gitops-control-plane gitops-worker1, 11
SSL certificate problem: self-signed certificateArgo CD made its own certificate. Encrypted, but nothing has vouched for it--insecure on a local port-forward only2
OutOfSync, and it stays that waySelf-heal or automated sync is off, so drift is reported and leftargocd app diff APP, then argocd app sync APP2, 4
OutOfSync, with one resource Git doesn't havePrune is off, so Argo CD won't delete itargocd app sync APP --prune, or prune: true4
Merged, but still Synced to the old commitArgo CD hasn't checked Git yet. Or the commit never reached GitHubargocd app get APP --refresh, and git status for "ahead of origin"3
Synced, but the pods serve the old pageA ConfigMap mounted as files updates in place, about a minute later, without new podsA checksum/ annotation on the pod template, so a new page rolls the pods4, 6
Synced and Progressing, with ImagePullBackOff or ErrImagePullThe new pod can't download its image: often a tag that doesn't exist. The old pods keep servingkubectl get events -n NAMESPACE --field-selector reason=Failed, then git revert9
Synced and Healthy, and wrongEvery check passed. They test running, not rightThe page itself. Revert in Git9
rollback cannot be initiated when auto-sync is enabledargocd app rollback would be undone by the next sync from Gitgit revert COMMIT, by pull request9
An argocd app set change disappears in a secondThe root Application manages this Application's file, and put it backEdit the file in argocd/, by pull request8
Application deleted, its pods still runningNo finalizer, so deleting the Application left its resources behindkubectl delete namespace NAMESPACE, and resources-finalizer.argocd.argoproj.io next time8
helm template accepts a wrong value, or ignores a misspelled oneHelm doesn't check values unless the chart has a schemavalues.schema.json in the chart5
is not a valid chart repository or cannot be reached ... 404 Not FoundThe chart repository's address is wrong, or the project moved itThe project's current install instructions10
targetRevision: null in an ApplicationSomething wrote an empty value into the fileThe script that wrote it: stop on empty values10
ErrUnsealFailed ... no key could decrypt secretThe SealedSecret was sealed for another namespace or name, or for another cluster's keykubectl get events -n NAMESPACE --field-selector involvedObject.kind=SealedSecret10, 11
OutOfSync and Missing right after a rebuildIt needs something another app hasn't installed yet, such as a SealedSecret's definition. It catches up on its ownWait, and watch kubectl get applications -n argocd11

Sync and health

Every Application has two statuses. They answer different questions.

StatusMeansLesson
SyncedThe cluster matches what Git says. Not the same as working1, 9
OutOfSyncThe cluster differs from Git: a new commit, or a change by hand1, 2
HealthyWhat's running is ready and answering. Not the same as right1, 9
ProgressingOn its way: pods starting, or stuck starting. Becomes Degraded if it gives up1, 9
DegradedIt failed to get there: by default after ten minutes of a stuck rollout9
MissingGit has it and the cluster doesn't, yet11

The cluster and Argo CD

ToRunLesson
Create the practice clusterkind create cluster --name gitops --config kind-gitops.yaml1
Install a pinned Argo CDkubectl apply -n argocd --server-side --force-conflicts -f .../v3.5.7/manifests/install.yaml1
Wait for it to be readykubectl wait -n argocd --for=condition=Available deployment --all1
Pause the cluster, start it againdocker stop gitops-control-plane gitops-worker, then docker start1
Delete the clusterkind delete cluster --name gitops1, 11

The argocd command

ToRunLesson
Install itbrew install argocd2
Reach the server, in its own terminalkubectl port-forward svc/argocd-server -n argocd 8080:4432
Read the first passwordkubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath="{.data.password}" | base64 -d2
Log inargocd login localhost:8080 --username admin --password "$(cat .argocd-admin)" --insecure2
Change a passwordargocd account update-password --account admin2, 11
Both versionsargocd version --short2
Every app at onceargocd app list2, 7
An app's details and resourcesargocd app get APP2
Check Git nowargocd app get APP --refresh3, 4
How the cluster differs from Gitargocd app diff APP; exit code 1 if different2
The YAML it appliesargocd app manifests APP2
What it deployed, and whenargocd app history APP2, 9
Sync by handargocd app sync APP2, 4
The web interfacehttps://localhost:8080, with the port-forward running2

Applications

ToRunLesson
Point one at your repositoryrepoURL:, targetRevision: main, path: FOLDER3
Add one, before app-of-appskubectl apply -f argocd/APP.yaml1, 3
See its status with kubectlkubectl get application APP -n argocd1
Which commit is runningkubectl get application APP -n argocd -o jsonpath='{.status.sync.revision}'1, 3
What Argo CD didkubectl get events -n argocd --field-selector involvedObject.name=APP1
How often it checks Gittimeout.reconciliation in the argocd-cm ConfigMap; blank is the default3
Deploy a changeA branch, a commit, a pull request, merged3
Reach an appkubectl port-forward svc/APP -n NAMESPACE 8081:803

Sync policies

ToRunLesson
Apply Git changes without a personsyncPolicy: automated: {}4
Delete what Git no longer hasprune: true4
Undo hand changes to the clusterselfHeal: true4
Sync by hand, and pruneargocd app sync APP --prune4
Never prune one resourceargocd.argoproj.io/sync-options: Prune=false, as an annotation4
Let something else own a fieldignoreDifferences: in the Application4
Create the namespace if neededsyncOptions: [CreateNamespace=true]3
Quick changes, for testing onlyargocd app set APP --self-heal=false, --sync-policy none2, 4

Helm

ToRunLesson
Check a chart is well formedhelm lint charts/bookshop5
See the YAML it makeshelm template NAME charts/bookshop5
One template onlyhelm template NAME charts/bookshop -s templates/FILE.yaml10
Change one value--set replicas=3, or --set-string for text5
Use values files, later winning-f values.yaml -f values-production.yaml5, 7
Compare two rendersdiff <(helm template ...) <(helm template ... -f FILE)5, 7
Read a value{{ .Values.replicas }}5
Paste a block, indented{{- toYaml .Values.resources | nindent 12 }}5
Reuse a piecedefine in _helpers.tpl, then include "NAME" . | nindent 45
Read a file, as a template{{ tpl (.Files.Get "files/index.html") . }}5
Only when a value is set{{- if .Values.shop.banner }} ... {{- end }}7, 10
Install, upgrade, list, removehelm install, helm upgrade, helm list -n NAMESPACE, helm uninstall5
History, and roll back, without Argo CDhelm history NAME, helm rollback NAME REVISION5

Helm in Argo CD

ToRunLesson
Point an Application at a chart in Gitpath: charts/bookshop, with a Chart.yaml in it6
Name the release, choose valueshelm: releaseName: bookshop, valueFiles: [values.yaml, values-production.yaml]6, 7
A chart from a chart repositoryrepoURL: URL, chart: NAME, targetRevision: CHART-VERSION10
Set a chart's values in the Applicationhelm: valuesObject:10
Find a chart's versionshelm repo add NAME URL, then helm search repo NAME/CHART10
Preview a change against what's runninghelm template ... > FILE, then kubectl diff -n NAMESPACE -f FILE6
Check there's no Helm releasehelm list -A: Argo CD renders charts, and doesn't install them as releases6
Roll pods when a ConfigMap changeschecksum/page: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}6
Pause before a pod stopslifecycle: preStop: exec: command: ["sleep", "5"]6
Watch a rollout finishkubectl rollout status deployment/APP -n NAMESPACE6, 7
Probe a Service from inside the clusterkubectl run probe --image=curlimages/curl:8.11.1 ...6, 9
Count the probe's answerskubectl logs probe | awk '{print $2}' | sort | uniq -c6, 9

Environments and promotion

ToRunLesson
Give an environment its own settingsvalues-staging.yaml, values-production.yaml in the chart7
A second environmentA second Application: a new name, values file and namespace7
Check an image tag existsdocker buildx imagetools inspect nginx:TAG7
See what a chart change does to productionRender production before and after, and diff7
Promote a releaseCopy the release's values into production's file, by pull request7
Check production asks for what staging randiff the two files, ignoring the environment's own settings7
Check after a rollout has settledkubectl rollout status, then kubectl exec deploy/APP -- ...7

App-of-apps

ToRunLesson
A root ApplicationAn Application with path: argocd and destination.namespace: argocd8
Start the chain, oncekubectl apply -f bootstrap/root.yaml8, 11
Check files match before adoptingkubectl diff -f argocd/FILE.yaml8
See what the root managesargocd app get root8
Who owns an ApplicationIts argocd.argoproj.io/tracking-id annotation8
Add, or remove, an appAdd, or delete, a file in argocd/, by pull request8
Delete an app's resources with itfinalizers: [resources-finalizer.argocd.argoproj.io]8
Clean up orphans by handkubectl delete namespace NAMESPACE8

Rolling back

ToRunLesson
See why a pod won't startkubectl get pods, then kubectl get events --field-selector reason=Failed9
Undo a commit, keeping historygit revert --no-edit COMMIT9
Roll back, the GitOps wayA branch, git revert, a pull request, merged9
See what a revert changedgit show --stat HEAD9
Argo CD's rollback, manual sync onlyargocd app rollback APP ID, then revert in Git9

Secrets

ToRunLesson
Read a Secret's valuekubectl get secret NAME -n NAMESPACE -o jsonpath='{.data.KEY}' | base64 -d10
Install kubesealbrew install kubeseal10
Get the public keykubeseal --fetch-cert10
Seal one valueprintf %s "VALUE" | kubeseal --raw --namespace NAMESPACE --name NAME10
Check it unsealedkubectl get sealedsecret,secret -n NAMESPACE10
See why it didn'tkubectl get events -n NAMESPACE --field-selector involvedObject.kind=SealedSecret10
Check a password isn't in Gitgit log -p | grep -c 'PASSWORD'10
Back up the sealing keykubectl get secret -n kube-system -l sealedsecrets.bitnami.com/sealed-secrets-key -o yaml, to a file in .gitignore10
Keep a file out of GitAdd it to .gitignore before it exists, and chmod 600 it2, 10

Rebuilding from Git

The order matters. Everything after the root comes from Git.

StepRunLesson
1. A clusterkind create cluster --name gitops --config kind-gitops.yaml11
2. The sealing key, before Sealed Secretssed -E '/^ +(resourceVersion|uid|creationTimestamp):/d' the backup, then kubectl apply -f it11
3. Argo CDkubectl create namespace argocd, then the pinned install1, 11
4. The admin passwordargocd account update-password --account admin, then delete argocd-initial-admin-secret2, 11
5. The rootkubectl apply -f bootstrap/root.yaml8, 11
6. Watch it come backkubectl get applications -n argocd11
If the key came too latekubectl delete pod -n kube-system -l app.kubernetes.io/name=sealed-secrets11

Git rebuilds what runs. Data an app stores, in a database or on a disk, needs backups of its own. See Lesson 11.