GitOps
In one line
GitOps uses Git as the source of truth — changes in Git automatically sync to the cluster. Git history IS the deployment history.
In simple words
GitOps manages infrastructure and deployments where Git is the single source of truth. All configuration lives in Git. An operator continuously syncs the cluster state to match the Git repository.
How it works: 1. All config in Git 2. Change is a Git commit 3. Operator (Argo CD, Flux) detects change 4. Operator applies change automatically
Benefits: version control, rollback (revert Git commit), audit trail, no manual kubectl. Tools: Argo CD, Flux.
Example
git commit -m "Upgrade my-app to v2" && git push
# Argo CD auto-detects and syncs
argocd app get my-app # Status: Healthy, Synced
# Rollback? git revert HEAD && git pushChanges go through Git PRs. Argo CD auto-syncs the cluster to match Git. Rollback is just a Git revert. No manual kubectl.
Common confusions
Confused with: CI/CD
The difference: CI/CD pushes changes from a pipeline to the cluster (push model). GitOps pulls changes from Git to the cluster (pull model). GitOps is more secure and gives a clear audit trail.
Related terms
Related Resources
Related Lessons
- GitOps
GitOps.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.