Argo CD has a UI. Flux is headless ā it runs as controllers and reconciles state from Git without a dashboard. This makes Flux lighter, more composable, and better suited for teams that live in the terminal.
Architecture
Git Repository ā Source Controller ā Kustomize/Helm Controller ā Cluster
ā
Notification Controller ā Slack/TeamsFour controllers, each handling one concern: - Source: Watches Git repos, Helm repos, S3 buckets - Kustomize: Applies Kustomize overlays - Helm: Manages Helm releases - Notification: Sends alerts on reconciliation events
Bootstrap
flux bootstrap github \
--owner=myorg \
--repository=fleet-infra \
--path=clusters/production \
--personalFlux creates the repo, commits its own manifests, and starts reconciling. The cluster manages itself from Git.
Repository Structure
fleet-infra/
āāā clusters/
ā āāā production/
ā ā āāā flux-system/ # Flux controllers (auto-generated)
ā ā āāā infrastructure.yaml # Sources for infra components
ā ā āāā apps.yaml # Sources for applications
ā āāā staging/
ā āāā flux-system/
ā āāā infrastructure.yaml
ā āāā apps.yaml
āāā infrastructure/
ā āāā sources/ # HelmRepository definitions
ā ā āāā prometheus.yaml
ā ā āāā ingress-nginx.yaml
ā āāā monitoring/ # Prometheus + Grafana
ā ā āāā kustomization.yaml
ā ā āāā helmrelease.yaml
ā āāā ingress/
ā āāā kustomization.yaml
ā āāā helmrelease.yaml
āāā apps/
āāā base/
ā āāā order-api/
ā āāā deployment.yaml
ā āāā service.yaml
ā āāā kustomization.yaml
āāā production/
ā āāā order-api/
ā āāā kustomization.yaml # Overlays for prod
ā āāā patch-replicas.yaml
āāā staging/
āāā order-api/
āāā kustomization.yamlMaster this topic with hands-on labs
Go beyond reading ā build real projects in sandboxed environments with expert video guidance.
Browse Courses āKustomize Deployment
# clusters/production/apps.yaml
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: apps
namespace: flux-system
spec:
interval: 10m
sourceRef:
kind: GitRepository
name: flux-system
path: ./apps/production
prune: true
healthChecks:
- apiVersion: apps/v1
kind: Deployment
name: order-api
namespace: productionFlux applies the Kustomize overlay every 10 minutes. If resources are deleted from Git, prune: true removes them from the cluster.
Helm Release
# infrastructure/sources/prometheus.yaml
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: prometheus-community
namespace: flux-system
spec:
interval: 1h
url: https://prometheus-community.github.io/helm-charts# infrastructure/monitoring/helmrelease.yaml
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: prometheus
namespace: monitoring
spec:
interval: 30m
chart:
spec:
chart: kube-prometheus-stack
version: ">=55.0.0 <56.0.0"
sourceRef:
kind: HelmRepository
name: prometheus-community
namespace: flux-system
values:
alertmanager:
enabled: true
grafana:
adminPassword:
valueFrom:
secretKeyRef:
name: grafana-admin
key: passwordImage Automation
Auto-update image tags when new versions are pushed:
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImageRepository
metadata:
name: order-api
spec:
image: ghcr.io/myorg/order-api
interval: 5m
---
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImagePolicy
metadata:
name: order-api
spec:
imageRepositoryRef:
name: order-api
policy:
semver:
range: ">=1.0.0"
---
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImageUpdateAutomation
metadata:
name: flux-system
spec:
interval: 30m
sourceRef:
kind: GitRepository
name: flux-system
git:
commit:
author:
name: flux
email: flux@myorg.com
push:
branch: main
update:
strategy: Setters
path: ./appsIn your manifests, mark which images to update:
image: ghcr.io/myorg/order-api:1.2.0 # {"$imagepolicy": "flux-system:order-api"}New image pushed ā Flux detects it ā commits updated tag to Git ā reconciles.
Get weekly IT automation tips
Docker, Ansible, Terraform, MLOps ā curated insights delivered to your inbox. No spam.
Subscribe Free āNotifications
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: slack
spec:
type: slack
channel: deployments
secretRef:
name: slack-webhook
---
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
name: on-call
spec:
providerRef:
name: slack
eventSeverity: error
eventSources:
- kind: Kustomization
name: "*"
- kind: HelmRelease
name: "*"Dependencies
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: apps
spec:
dependsOn:
- name: infrastructure # Wait for infra (ingress, monitoring) first
path: ./apps/productionInfrastructure deploys first, then applications.
Flux vs Argo CD
| Feature | Flux | Argo CD |
|---|---|---|
| UI | CLI only (Weave GitOps optional) | Built-in web UI |
| Architecture | Multiple controllers | Single server |
| Helm support | HelmRelease CRD | Application CRD |
| Image automation | Built-in | Argo Image Updater |
| Multi-tenancy | Namespace scoping | Projects + RBAC |
| SOPS/age | Built-in decryption | Plugin needed |
Use Flux for headless GitOps, teams comfortable with CLI, and when you want composable controllers. Use Argo CD when you need a visual dashboard and manual sync controls.
---
Ready to go deeper? Master Kubernetes GitOps with hands-on courses at CopyPasteLearn.
Ready to learn by doing?
Stop reading tutorials ā start building. Expert video courses with hands-on labs in real sandboxed environments.
Related Articles
Flux GitOps Kubernetes Tutorial
Flux is a GitOps tool that continuously reconciles your Kubernetes cluster with a Git repository. Learn how to set up Flux, manage Helm releases, and handle.
Kustomize Kubernetes Configuration
Kustomize customizes Kubernetes manifests without templates using overlays and patches. Learn how to manage multiple environments, merge configurations.
Crossplane Infrastructure as Code
Crossplane lets you manage cloud infrastructure using Kubernetes custom resources. Learn how it works, how it compares to Terraform, and when to choose.
Getting Started with Docker
Learn Docker fundamentals from scratch ā containers, images, Dockerfiles, and real-world workflows. No prior experience needed.
Git Branching Strategy for Teams
Choose the right Git branching strategy. Compare GitFlow, GitHub Flow, and trunk-based development for different team sizes and needs.
Git for DevOps Engineers
Essential Git workflows for DevOps: branching strategies, interactive rebasing, cherry-picking, bisect debugging, and CI/CD integration.
Explore topics
Browse more articles on the topics covered here.