Summary
GitOps is an operational model where the entire desired state of infrastructure and applications is stored in Git, and automated controllers continuously reconcile the live environment with what is declared in the repository.
What is GitOps?
GitOps was coined by Weaveworks in 2017 and has become the standard deployment model for Kubernetes-based platforms. The core principle is that every change to infrastructure or applications must go through a Git pull request. Git serves as the audit log, the access control boundary, and the rollback mechanism.
A GitOps controller such as Argo CD or Flux CD runs inside the cluster and continuously compares the desired state in Git with the actual state in the cluster. When it detects a divergence, it automatically reconciles by applying the necessary changes. This means no developer or pipeline ever pushes directly to the cluster — the cluster pulls its desired state from Git.
GitOps provides a clear separation between the CI pipeline (which builds and tests artifacts) and the CD process (which declares what version should run where). This separation improves auditability and security.
Why is GitOps relevant?
- Auditability: Every change is a Git commit with author, timestamp, and review history
- Security: Cluster credentials never leave the cluster; pipelines push to Git, not directly to production
- Self-healing: The reconciliation loop automatically reverts unauthorized or accidental changes to the cluster