GitOps is an operational model where Git is the single source of truth for your infrastructure and application deployments. You describe the desired state of your system in Git — what services should be running, what versions, what configuration — and an automated agent continuously reconciles the live environment to match what’s in Git. If someone changes something manually in production, the system detects the drift and corrects it.

Why It Exists

Traditional CI/CD works like this: code gets pushed, a pipeline runs, and at the end of the pipeline, a script pushes changes to production. The pipeline is imperative — it describes the steps to take. If step 4 fails, you’re in a partially deployed state. If someone makes a manual change in production between deployments, your Git repository and your live environment are out of sync, and nobody knows until something breaks.

GitOps flips this model. Instead of a pipeline pushing changes to production, an agent running in your environment pulls the desired state from Git and applies it. The agent runs continuously, so if anything drifts from the declared state — whether from a failed deployment or a manual change — it gets corrected automatically.

Weaveworks coined the term in 2017, and tools like ArgoCD and Flux have made it practical for Kubernetes environments.

How It’s Different From CI/CD

CI/CD and GitOps aren’t mutually exclusive — most GitOps implementations include a CI pipeline. The difference is in the deployment model:

Standard CI/CD: Code push → build → test → pipeline pushes deployment to production. The pipeline has credentials to modify production. The pipeline defines the deployment steps.

GitOps: Code push → build → test → CI updates the desired state in a Git repository → an agent in the environment detects the change → the agent pulls the new state and applies it. The pipeline never touches production directly. The agent in the environment has the credentials, not the pipeline.

This distinction matters for security (the CI system doesn’t need production access), auditability (every change to production is a Git commit with an author and a review), and recovery (rolling back means reverting a Git commit, not trying to remember what the previous deployment looked like).

Who Needs It

GitOps makes the most sense for teams running Kubernetes in production — it was designed for that world, and the tooling (ArgoCD, Flux) is built for Kubernetes.

Under 10 engineers with a simple deployment model (a few services, one or two environments): standard CI/CD with good practices (infrastructure as code, automated testing, one-click rollback) is sufficient. GitOps adds operational complexity that doesn’t pay off at this scale.

At 10-30 engineers with multiple services and environments: GitOps starts delivering value. The auditability alone — being able to see every production change as a Git commit — saves significant time during incident investigations.

At 30+ engineers with a Kubernetes-based platform: GitOps is close to a best practice. The consistency guarantees (production matches what’s in Git) and the drift detection (unauthorized changes get reverted) become essential at scale.

If you’re not running Kubernetes, GitOps principles (declarative configuration in Git, automated reconciliation) are still valuable, but the tooling ecosystem is less mature.

Common Mistakes

Putting application code and deployment configuration in the same repository. Best practice is to separate them. Application code changes frequently and triggers CI builds. Deployment configuration (what version to deploy where) changes less frequently and triggers the GitOps agent. Mixing them creates unnecessary deployments and confusing Git history.

Using GitOps without proper Git workflow discipline. If your team doesn’t use pull requests, code review, and branch protections consistently, GitOps won’t help — it’ll just deploy bad configurations faster. GitOps amplifies your Git workflow discipline, for better or worse.

Expecting GitOps to replace all operational work. GitOps handles deployment and configuration drift. It doesn’t handle incident response, capacity planning, or performance tuning. It’s one piece of the operational puzzle, not the whole picture.

The Verdict

GitOps is a genuinely better deployment model for teams running Kubernetes with multiple services and environments. The auditability, drift detection, and security improvements are real. But it’s not a replacement for solid CI/CD fundamentals — it’s a layer on top of them. If your CI pipeline is broken, adopting GitOps will just give you a more sophisticated way to deploy broken builds.


Related: DevOps Fundamentals for Growing Teams | What Are DORA Metrics