KCNA — ArgoCD and Flux
ArgoCD and Flux
ArgoCD and Flux are the two leading GitOps tools for Kubernetes. Both are CNCF Graduated projects that continuously reconcile the desired state in Git with the actual state in the cluster.
ArgoCD
What Is ArgoCD?
ArgoCD is part of the Argo project (CNCF Graduated). It’s a declarative, GitOps continuous delivery tool for Kubernetes.
Architecture
┌──────────────────────────────────────────────┐
│ ArgoCD (in cluster) │
│ │
│ ┌───────────────┐ ┌───────────────────────┐ │
│ │ Repo Server │ │ Application │ │
│ │ (clone Git │ │ Controller │ │
│ │ repos,render │ │ (watch & reconcile) │ │
│ │ manifests) │ │ │ │
│ └───────┬───────┘ └──────────┬────────────┘ │
│ │ │ │
│ ┌───────▼─────────────────────▼──────────┐ │
│ │ API Server │ │
│ │ (gRPC/REST API + Web UI + CLI) │ │
│ └────────────────────────────────────────┘ │
└──────────────────────────────────────────────┘
│ │
▼ ▼
Git Repository Kubernetes Cluster
(desired state) (actual state)
Key Features
| Feature | Description |
|---|---|
| Web UI | Visual dashboard showing app status, sync state, and resource tree |
| Multi-cluster | Manage applications across multiple Kubernetes clusters |
| SSO Integration | OIDC, SAML, LDAP, GitHub/GitLab authentication |
| RBAC | Fine-grained access control per project/application |
| Sync Policies | Auto-sync, manual sync, self-heal, prune |
| Manifest Sources | Helm, Kustomize, plain YAML, Jsonnet |
ArgoCD Application
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-app
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/org/my-app-config.git
targetRevision: main
path: k8s/overlays/production
destination:
server: https://kubernetes.default.svc
namespace: production
syncPolicy:
automated:
prune: true # Delete resources removed from Git
selfHeal: true # Revert manual changes
Sync Strategies
| Strategy | Description |
|---|---|
| Manual Sync | You click “Sync” in the UI or run argocd app sync |
| Auto-Sync | ArgoCD automatically applies changes when Git changes |
| Self-Heal | Reverts manual changes made directly to the cluster |
| Prune | Deletes resources that exist in the cluster but not in Git |
Flux
What Is Flux?
Flux is a CNCF Graduated GitOps toolkit. It’s a set of controllers that keep Kubernetes clusters in sync with Git repositories.
Architecture
Flux uses a modular controller-based architecture:
Git Repository
│
▼
┌────────────────┐
│ Source │ ← Watches Git repos, Helm repos, OCI registries
│ Controller │
└───────┬────────┘
│
▼
┌────────────────┐
│ Kustomize │ ← Applies Kustomize overlays
│ Controller │
├────────────────┤
│ Helm │ ← Manages Helm releases
│ Controller │
└───────┬────────┘
│
▼
Kubernetes Cluster
Key Components
| Controller | Purpose |
|---|---|
| Source Controller | Fetches manifests from Git repos, Helm repos, OCI registries |
| Kustomize Controller | Reconciles Kustomize manifests on the cluster |
| Helm Controller | Manages Helm chart releases |
| Notification Controller | Handles alerts and notifications (Slack, Teams, webhooks) |
| Image Automation Controller | Detects new container images and updates Git |
Flux GitRepository + Kustomization
# Source: Watch a Git repository
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: my-app
namespace: flux-system
spec:
interval: 1m
url: https://github.com/org/my-app-config.git
ref:
branch: main
---
# Apply: Reconcile manifests from the source
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: my-app
namespace: flux-system
spec:
interval: 5m
path: ./k8s/production
prune: true
sourceRef:
kind: GitRepository
name: my-app
ArgoCD vs Flux
| Aspect | ArgoCD | Flux |
|---|---|---|
| CNCF Status | Graduated (Argo project) | Graduated |
| UI | Built-in Web UI with resource visualization | No built-in UI (use Weave GitOps or Grafana dashboards) |
| Architecture | Monolithic (single deployment) | Modular (separate controllers) |
| Multi-cluster | Native support via Application Sets | Requires additional setup |
| Manifest Sources | Helm, Kustomize, Jsonnet, plain YAML | Helm, Kustomize, plain YAML |
| Image Automation | Argo Image Updater (separate) | Built-in Image Automation Controller |
| CLI | argocd CLI |
flux CLI |
| Best For | Teams that value a visual UI and multi-cluster management | Teams that prefer a lightweight, modular, CLI-driven approach |
Both tools achieve the same goal — GitOps continuous delivery — and the choice depends on team preference.
Common GitOps Patterns
App of Apps (ArgoCD)
A parent ArgoCD Application manages child Applications:
# Parent app manages all team applications
apps/
├── app-of-apps.yaml # Parent Application
├── frontend-app.yaml # Child Application
├── backend-app.yaml # Child Application
└── database-app.yaml # Child Application
Multi-Tenancy (Flux)
Each team gets its own Git source and namespace:
clusters/
├── team-a/
│ ├── source.yaml
│ └── kustomization.yaml
├── team-b/
│ ├── source.yaml
│ └── kustomization.yaml
KCNA Exam Tips
- Both ArgoCD and Flux are CNCF Graduated GitOps tools
- ArgoCD has a built-in Web UI; Flux does not
- Both support Helm and Kustomize as manifest sources
- Know what auto-sync and self-heal do in ArgoCD
- Flux uses a modular controller architecture (Source, Kustomize, Helm controllers)
- Both implement pull-based GitOps — the agent runs inside the cluster
- Know the difference between manual sync and auto-sync
What’s Next?
Learn deployment strategies — how to safely release new versions with minimal risk.