GitOps with Flux & Argo CD · Lesson 1 of 6 · 3 min read
GitOps principles
GitOps is how most modern Kubernetes platforms deploy: Git holds the desired state and an in-cluster controller continuously reconciles the cluster to it. Running Flux in production is a real strength — interviews will test whether you understand it beyond "it syncs Git", and will often ask you to compare it with Argo CD, design a multi-cluster repo layout, handle secrets, promote between environments, automate image updates, and recover from failures.
The four principles (OpenGitOps)
- Declarative — the whole system is described declaratively.
- Versioned and immutable — desired state is stored in a way that keeps history (Git).
- Pulled automatically — agents pull desired state from the source.
- Continuously reconciled — agents observe actual state and correct drift.
Enlarge diagram
Swipe sideways to see all of it, or tap to open it full screen.
Push vs pull deployment
Push (CI runs kubectl/helm) |
Pull (GitOps controller) | |
|---|---|---|
| Credentials | CI needs cluster-admin-ish credentials | Cluster pulls from Git; CI needs only Git write |
| Drift | Not detected | Detected and corrected continuously |
| Audit | CI logs | Git history = deployment history |
| Rollback | Re-run old pipeline | git revert |
| Multi-cluster | CI must reach every cluster | Each cluster pulls its own config — works behind firewalls/private endpoints |
| Visibility | Pipeline status | Controller status, health, events |
Enlarge diagram
Swipe sideways to see all of it, or tap to open it full screen.
CI builds and tests; GitOps deploys. CI's last step is updating the GitOps repo (or an image automation controller does it).