ArgoCD
01 / 02

Applications, Sync & GitOps Basics

ArgoCD: Applications, Sync & GitOps Basics

ArgoCD is a declarative GitOps continuous delivery tool for Kubernetes -- it continuously compares the desired state declared in a git repo against the cluster's live state, syncing (or flagging drift) as needed. Manifests live in git as the source of truth; CI systems never need direct deploy credentials to the cluster.

The Application Resource

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: my-api
  namespace: argocd
spec:
  project: default

  source:
    repoURL: https://github.com/myorg/manifests.git
    targetRevision: main
    path: apps/my-api/overlays/production   # Kustomize overlay, Helm chart, or plain YAML

  destination:
    server: https://kubernetes.default.svc
    namespace: production

  syncPolicy:
    automated:
      prune: true      # delete resources no longer declared in git
      selfHeal: true    # revert manual/direct cluster edits back to match git
    syncOptions:
      - CreateNamespace=true

Sync Status vs Health Status

  • Synced/OutOfSync: does the live cluster state match what's declared in git? A drifted kubectl edit, or an unsynced new commit, both show as OutOfSync.

  • Healthy/Progressing/Degraded: is the running resource actually functioning? A Deployment can be perfectly Synced while its new pods are still crash-looping (Degraded).

  • Manual sync: detected diffs require an explicit Sync action (dashboard/CLI) before being applied -- common for production.

  • Automated sync (syncPolicy.automated): diffs are applied automatically as soon as detected, no human approval step.

  • The diff view shows a field-by-field comparison before syncing -- exactly what would change, catching unexpected drift before applying.

How ArgoCD Detects Changes

# By default ArgoCD polls the tracked git repo on an interval
# (a few minutes) with zero extra configuration.

# A git provider webhook to ArgoCD's API triggers an immediate
# refresh on push, instead of waiting for the next poll.

# CLI -- scriptable, used from CI pipelines or automation
argocd app sync my-api
argocd app get my-api -o json
argocd app wait my-api --health   # block until Healthy, e.g. as a CI gate

Keep your own version of these notes — editable, searchable, and organised by your stack.

Start free