Skip to content
What Is GitOps?

What Is GitOps?

October 27, 2026·anupam
anupam

GitOps is not just installing ArgoCD or FluxCD, it’s more and I tried to break down.

Bob logged into the cluster one evening and changed a worker node’s resource limit. Quick fix, nobody knew. After a few weeks the manager asks, “who changed what in our cluster?” and everybody just looks at each other. Nobody has the answer. That small story is the reason GitOps exists.

GitOps Inception

The textbook line is:

GitOps uses Git as a single source of truth to deliver applications and infrastructure.

Notice the word infrastructure. GitOps is not only for apps, you can deliver infra the same way.

Now the obvious question: we can already deliver things with shell scripts, Python or whatever, so why drag Git into this? Because of Bob. Linux logs may tell you who logged in, but they won’t tell you which change was made by which person. No proper tracking, no proper audit.

Git gives you both for free:

What You NeedWhat Git Already Gives
TrackingPull request, review, commit
AuditingWho changed what, and when
RollbackRevert the commit

So people said, why not connect delivery directly with Git? That is how GitOps was born.

How It Looks

Nobody touches the cluster by hand. You change the YAML in Git, and a controller (ArgoCD here) running inside the cluster reads Git and applies it.

    flowchart LR
    actor["Actor"] -->|PR, review, merge| repo["Git Repo (K8s YAML)"]
    subgraph cluster["K8s Cluster"]
        ctrl["GitOps Controller (ArgoCD)"] -->|Deploys| res["Resources"]
    end
    ctrl -->|Reads| repo
  

Works fine for one cluster. But think about 100s of clusters, then 1000s of resources. Without the GitOps way, managing, tracking, auditing and changing all of that becomes a headache.

GitOps Principles

#PrincipleIn Simple Words
1DeclarativeDesired state is written as what you want. What you see in the YAML is what you finally get
2Versioned And ImmutableDesired state is versioned. Git is the usual choice, but even a versioned S3 bucket can do it
3Pulled Or Pushed AutomaticallyEither the controller pulls the change, or the change is pushed to it automatically (like a webhook)
4Continuously ReconciledController keeps watching the cluster and Git. If they don’t match, Git wins

About the last one: the controller can’t stop somebody from changing the cluster by hand, but it will notice and put things back as Git says.

    flowchart LR
    watch["Watch Git and Cluster"] --> same{"Match?"}
    same -->|Yes| watch
    same -->|No| fix["Reconcile: Make Cluster Match Git"]
    fix --> watch
  

Note

GitOps by principle is not only for Kubernetes. It is just that most of the popular controllers are focused on K8s clusters.

Advantages

AdvantageWhy
SecurityContinuous reconcile throws away unwanted changes
VersioningEvery change lives in Git history
Auto upgradesMerge a change and it rolls out by itself
Auto healingSomething drifts or breaks, controller brings it back
AuditEvery change has a name and a reviewed PR behind it

So next time the manager asks who changed what, you just open Git history and show.

Last updated on