Skip to content
atlas

GitOps

Running systems so that files under version control hold the only true description, and software keeps the live setup matching them.

Draft - this entry has not been reviewed yet.

Formal

An operating model where the wanted state of a system is written as files under version control, a change is made only by changing those files, and an agent inside the system keeps pulling the files and correcting any difference it finds.

In plain English

Like a shop where the price list on the wall is the rule; if someone changes a price tag on the shelf, staff put it back to match the wall.

In practice

Before flu vaccine booking opens, an engineer in a region's IT department asks for two more copies of the booking service by editing a file; once it is approved, the system starts them on its own within minutes.

Why it matters

Every change passes through review and leaves a trail, people need less direct access to live systems, and hand-made changes are undone automatically instead of lingering unseen.

Technical deep dive

The term was coined in 2017 by Alexis Richardson of Weaveworks, whose Flux tool first implemented it for Kubernetes. The CNCF OpenGitOps project later distilled it into four principles (v1.0.0): the system's desired state is expressed declaratively; it is stored in a way that is versioned and immutable, with a complete history; software agents pull the desired state automatically from that source; and those agents continuously reconcile the actual state towards it. Git is the usual store but not strictly required - OCI artefacts in a registry satisfy the same principles and are increasingly used as the transport.

The reference implementations are Argo CD and Flux, both graduated CNCF projects. An in-cluster controller clones or polls the repository (or receives a webhook), renders the manifests - plain YAML, Kustomize overlays or Helm charts - computes a diff against live objects using server-side apply or three-way merge, and applies the difference. With automated sync and self-heal enabled, a manual kubectl edit is reverted on the next reconciliation; pruning deletes objects that have disappeared from the repository. Ordering is handled with sync waves and hooks (Argo CD) or dependsOn and health checks (Flux). A typical layout separates application source repositories from an environment or "config" repository; CI builds and signs an image, then opens a pull request that bumps the image digest in the config repo, and promotion between environments is itself a reviewed merge.

The pull model is the security argument: CI no longer needs cluster-admin credentials, because only the in-cluster agent writes to the API server, and the audit trail of production changes is the repository's commit and review history. The trade-off is that the repository, and whoever can merge to its protected branches, now effectively controls production. Controls include branch protection with required reviews, verification of signed commits (both Argo CD and Flux can refuse unsigned or untrusted revisions), least-privilege service accounts per application rather than one cluster-admin controller, and restricting which repositories and namespaces each application may target. Secrets cannot be committed in plaintext, so teams use Sealed Secrets or SOPS-encrypted files, or reference external stores through the External Secrets Operator.

GitOps differs from infrastructure as code in scope and mechanism: IaC describes resources declaratively but is often applied in a push model by a pipeline running terraform apply, with drift detected only at the next plan, whereas GitOps adds continuous, agent-driven reconciliation. Failure modes include reconciliation loops fighting other controllers such as autoscalers over the same fields, drift hidden by ignore rules, and outages when the Git host is unavailable - running workloads continue, but nobody can change them through the normal path.

What to learn first

Everything this builds on, foundations first.

  1. Version control
  2. →Infrastructure as code (IaC)
  3. →GitOps

Relationships

Sources & further reading

Reference works

Where this data comes from

This entry was drafted by an AI from the sources above and has not yet been checked by a person. Treat it as a starting point, and check anything important against the sources.

See the review queueSuggest a correction on GitHubThis term as JSON

Check yourself

Loading…

Atlas is in beta.