GitOps with Flux & Argo CD · Lesson 3 of 6 · 4 min read
Argo CD in depth
Architecture
- API server — UI, CLI, SSO (OIDC/Dex), RBAC.
- Repo server — clones repos and renders manifests (plain YAML, Kustomize, Helm, Jsonnet, plugins).
- Application controller — compares desired vs live state, syncs, reports health.
- ApplicationSet controller — generates Applications from templates.
- Optional: Redis cache, notifications controller, Dex.
Enlarge diagram
Swipe sideways to see all of it, or tap to open it full screen.
Application
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata: { name: orders-prod, namespace: argocd }
spec:
project: payments
source:
repoURL: https://github.com/acme/platform-gitops
targetRevision: main
path: apps/orders/overlays/prod
destination:
server: https://kubernetes.default.svc
namespace: orders
syncPolicy:
automated: { prune: true, selfHeal: true }
syncOptions: [CreateNamespace=true, ServerSideApply=true]
retry: { limit: 5, backoff: { duration: 10s, factor: 2, maxDuration: 3m } }
Key ideas:
- Sync status (Synced/OutOfSync) vs health status (Healthy/Progressing/Degraded/Missing) — two separate dimensions.
- Automated sync with prune and selfHeal ≈ Flux's default behaviour; without automation, Argo shows OutOfSync and a human clicks Sync.
- Sync waves (
argocd.argoproj.io/sync-wave: "-1") and hooks (PreSync, Sync, PostSync, SyncFail) order resources and run Jobs. - AppProjects restrict which repos, destinations (clusters/namespaces) and resource kinds an Application can use — the multi-tenancy boundary.
- App of apps — one Application that deploys other Applications.
- ApplicationSet generators —
list,cluster(every registered cluster),git(directories/files),matrix,pull request(preview environments per PR). ignoreDifferencesfor fields mutated by controllers (e.g. HPA-managed replicas, webhook caBundle).- Argo CD renders Helm with
helm template— releases don't show inhelm list, and Helm hooks are mapped to Argo hooks.
Flux vs Argo CD
| Flux | Argo CD | |
|---|---|---|
| Model | Toolkit of controllers + CRDs; CLI-first | Application-centric with rich UI |
| UI | None built in; community UIs such as the Headlamp Flux plugin and Capacitor | Excellent built-in UI with diff and resource tree |
| Helm | Real Helm releases via helm-controller (helm list works, hooks, remediation) |
Renders with helm template, applies like plain manifests |
| Multi-cluster | Usually one Flux per cluster (pull), or one managing remotes via kubeconfig | Central Argo managing many clusters, or one per cluster |
| Multi-tenancy | Kubernetes RBAC via impersonated service accounts | AppProjects + Argo RBAC + SSO |
| Image automation | Built-in controllers commit to Git | Argo CD Image Updater (separate project) |
| Progressive delivery | Flagger | Argo Rollouts |
| Secrets | Native SOPS decryption | Plugins / External Secrets |
Both are CNCF graduated. A good answer: "I'd choose Argo CD when teams want a self-service UI and a central control plane, Flux when we want lightweight per-cluster pull with Kubernetes-native RBAC and native Helm releases."
Enlarge diagram
Swipe sideways to see all of it, or tap to open it full screen.