Skip to main content

GitOps

GitOps treats a Git repository as the source of truth for declarative infrastructure, with an agent continuously reconciling the live environment to the committed state.

GitOps is an operational model that uses a Git repository as the single source of truth for declarative infrastructure and applications. Changes are made by committing to Git, and an automated agent continuously reconciles the live environment to match the declared state.

How It Works

The desired state of a system, for example Kubernetes manifests or Helm charts, lives in a Git repository. A reconciliation controller such as Argo CD or Flux runs inside the cluster, watches the repository, and compares the declared state with the actual state. When they diverge, the controller applies the difference to bring the environment back in line. Because every change is a Git commit, the repository provides a complete, auditable history, and rolling back is as simple as reverting a commit.

Why It Matters

GitOps brings the discipline of version control to operations. It gives teams a clear audit trail, easy rollback, and a pull-based deployment model that keeps credentials inside the cluster rather than exposing them to external CI systems. Drift between declared and actual state is detected and corrected automatically. GitOps is especially well suited to Kubernetes and other declarative platforms, and it extends infrastructure-as-code into a continuously enforced practice.

Related Terms

GitOps builds on infrastructure-as-code and version control, and is most commonly applied to Kubernetes. It is closely related to continuous deployment.