Point ArgoCD at a git repository and watch it deploy your app. The Application resource is the heart of ArgoCD — it maps a repo path to a destination cluster and namespace.
Why: an Application is how you tell ArgoCD "deploy the manifests at THIS repo path to THAT cluster and namespace". source is where the desired state lives (a git repo, a path, a revision); destination is where it goes. It is itself a Kubernetes resource, so you manage ArgoCD the same GitOps way.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: guestbook
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/argoproj/argocd-example-apps
path: guestbook # folder of manifests in the repo
targetRevision: HEAD # branch, tag, or commit
destination:
server: https://kubernetes.default.svc # the local cluster
namespace: guestbookWhy: apply the Application like any manifest (or create it with the CLI). ArgoCD reads the repo, sees the live cluster has none of it, and reports the app as OutOfSync. argocd app get shows the diff between git and the cluster — the core GitOps view.
Register the application
kubectl apply -f application.yamlSee its status: health and sync state
argocd app get guestbookWhy: by default ArgoCD detects drift but waits for you to approve the first deploy. argocd app sync applies the git manifests to the cluster, moving the app from OutOfSync to Synced and (once pods are up) Healthy. Watch the resources appear in the namespace.
Apply the git state to the cluster
argocd app sync guestbookThe workloads now exist — confirm
kubectl get pods -n guestbookNote: ArgoCD tracks two independent statuses for every app. Sync status answers "does the cluster match git?" — Synced or OutOfSync. Health status answers "are the running resources actually healthy?" — Healthy, Progressing, Degraded. You want both green. A Synced-but-Degraded app means git was applied but something is failing at runtime.
Sync status ─ Synced / OutOfSync → does live state match git?
Health status ─ Healthy / Progressing / Degraded → are resources OK?
goal: Synced + Healthy (applied from git AND running correctly)