- the source of truth for your desired state (Git repository, path, branch/tag, or chart),
- and the destination where those manifests should be applied (Kubernetes API server and namespace).
Create an Application (CLI)
A common way to create an application is with theargocd CLI. The example below creates an application that points to a Git repository and a path inside that repo:
An Argo CD Application has two primary parts:
source: where the desired manifests live (Git repo, path, branch/tag, Helm chart, Kustomize or Jsonnet).destination: the target Kubernetes API server and namespace where resources should be applied.
Example Application manifest
Below is a representativeApplication manifest for the same app created above:
Key fields explained
Notes on spec.source
- Supports multiple formats: Git manifests, Helm charts, Kustomize overlays, and Jsonnet.
targetRevisionaccepts a branch name, tag, or commit SHA (default:HEAD).
Notes on spec.destination
- For in-cluster deployments use
https://kubernetes.default.svc. - For external clusters use the API server URL as registered in Argo CD (via
argocd cluster addor the UI).
Notes on spec.syncPolicy
automatedcauses Argo CD to automatically apply Git changes.selfHeal: trueinstructs Argo CD to detect and revert out-of-band changes made directly in the cluster.- Use
syncOptions(for example,CreateNamespace=true) to control sync-time behaviors.
Common use cases and behavior
- Continuous delivery: Argo CD watches the Git repo and automatically synchronizes changes (when
automatedis enabled). - Drift detection & remediation: With
selfHeal: true, Argo CD restores cluster state when manual changes diverge from Git. - Multi-cluster deployments: Use
destination.servervalues that target different clusters registered in Argo CD.
References and further reading
- Argo CD official docs: https://argo-cd.readthedocs.io/
- GitOps overview: https://www.gitops.tech/
- Helm: https://helm.sh/
- Kustomize: https://kubectl.docs.kubernetes.io/references/kustomize/
- Jsonnet: https://jsonnet.org