Skip to content

What is GitOps?

GitOps manages software systems by comparing their live state with versioned, declared configuration that automated agents retrieve and attempt to apply.

GitOps is a method for managing software systems by continuously comparing their desired configuration with their actual state. The configuration is declarative: it describes the intended result, such as a service's version and replica count, rather than a sequence of manual commands. It is kept under version control, often in a Git repository. An automated agent retrieves these declarations and attempts to bring the system into the declared state; this cycle is called reconciliation. The OpenGitOps principles require declarative state, immutable versions, automatic retrieval, and continuous reconciliation. The method can manage both applications and infrastructure, although it is often associated with Kubernetes. Git is common, but it is not the only possible source of state. Nor does a reconciliation attempt guarantee a healthy service: configuration errors or permission and dependency problems can prevent the desired state from being applied.

See also: Infrastructure as Code (IaC)Describing servers, networks and cloud services in versioned code files instead of configuring them by hand, so infrastructure is created and recreated reproducibly.

How it differs from traditional deployment

In a push-based deployment, a process sends a change to the environment and finishes. With GitOps, an agent pulls the declared state and keeps comparing it with the live system. CI/CD can build and test software before the approved configuration is applied. The OpenGitOps glossary states that reconciliation is triggered by any divergence, not only by an update; CNCF identifies drift, a difference between intended and actual configuration, as a problem with traditional approaches.

How it relates to IaC and CI/CD

Infrastructure as Code describes infrastructure in files; GitOps adds a loop that observes and reconciles the managed resources. The security self-assessment of Flux, an open source project, notes that drift correction can be suspended or limited, so it should not be treated as a security control.

An enterprise example

A company runs an order service across several environments. The team proposes a new version in the repository, a colleague reviews it, and automated checks validate the change. Once the change is approved, the environment's agent retrieves the configuration and attempts to apply it. If someone manually changes a resource within the agent's scope, the agent can detect the change and, depending on how it is configured, restore the declared state. For the same reason, if the release fails, the team rolls back with a new change in the repository rather than a manual fix; data and external dependencies still need to be checked.

Why it matters for decision makers

Before adopting a GitOps tool, ask which resources it controls, how it reports a failed attempt to apply the configuration, and how reconciliation is paused and resumed during an incident. Git history documents declared changes, not every action in the environment: operational logs and access controls are also needed. The CNCF security white paper recommends reviewing changes before merging them. Protecting the repository and granting the agent only the permissions it needs are operational decisions; the method does not provide them on its own.

Frequently asked questions

No. GitOps principles apply to managing software systems and do not require a specific platform.

Partly. CI still builds and tests the software; GitOps can replace push-based delivery with agents that retrieve and reconcile the declared state.

No. Restoring the previous configuration can help, but the data and dependencies involved also need to be checked.
  • Infrastructure as Code (IaC)Describing servers, networks and cloud services in versioned code files instead of configuring them by hand, so infrastructure is created and recreated reproducibly.
  • CI/CDContinuous Integration and Continuous Delivery: every software change is tested and shipped to production automatically and frequently.
  • Platform engineeringPlatform engineering designs shared, reusable, self-service internal capabilities as a product, helping internal teams build and operate their own software.
  • DevSecOpsDevSecOps integrates security, development, and operations throughout the software lifecycle, with shared responsibility and ongoing vulnerability management.

See it in the universe

If you need the AI in production, not in a demo, that is my job.

See AI integrations

Or write to me.