GitOps
GitOps is an operational pattern in which the desired state of infrastructure and applications is declared in a Git repository, and an automated controller continuously reconciles the running system toward that state. Git becomes the source of truth; deployments happen by merging pull requests, not by running ad-hoc commands.
Core principles
- Declarative. The repo describes the desired state, not the steps to reach it.
- Versioned and audited. Every change is a commit with an author, message, and history.
- Pulled, not pushed. An agent inside the cluster pulls from Git and applies; CI does not need cluster credentials.
- Continuously reconciled. Drift between Git and the live system is detected and corrected automatically.
How a pull request becomes a deploy
- Developer changes a Kubernetes manifest, Helm values, or Terraform file in a Git repo.
- CI runs tests and approvals; the change merges to the main branch.
- The GitOps agent (ArgoCD, Flux) notices the new commit and applies the manifests to the cluster.
- If anything drifts from Git, the agent re-converges the cluster.
Common tools
- Kubernetes-native: ArgoCD, Flux, Argo Rollouts
- Infrastructure: Atlantis, Terraform Cloud, Spacelift, env0
- Multi-runtime: Werf, Devtron, Codefresh
🔗