GitOps uses Git as the single source of truth for infrastructure and applications.
Core principles:
- All changes go through Git (pull requests, review)
- Automated sync from Git to cluster
- Drift detection and reconciliation
Tools:
- ArgoCD: Declarative GitOps for Kubernetes
- Flux: CNCF project, similar to ArgoCD
How it works:
Developer pushes manifest changes to Git
GitOps controller detects change
Controller applies change to cluster
Controller continuously reconciles desired vs actual state
Interview question: "What are the benefits of GitOps over traditional CI/CD?"