Skip to content
Optimal Lab

DevOps · interactive

GitOps

Git holds the desired state of the cluster. A controller running inside the cluster keeps comparing the two and applies whatever Git says. Deploying becomes merging a pull request.

Git repo

replicas: 3
controller
Synced

Cluster

3 pods running

Git says replicas: 3, and the cluster runs 3. In sync.

Self-heal

step 1 of 7
1

Git is the source of truth

Manifests or Helm values live in a repo. Every change is a reviewed commit with an author and a way back.

Rollback = git revert.

2

The controller pulls and applies

It runs in the cluster and reads Git, so CI never needs cluster admin credentials.

Argo CD and Flux are the common ones.

3

Detect and undo drift

Manual kubectl changes show as OutOfSync. With self-heal, they're reverted automatically.

Emergencies: change Git, or pause sync deliberately.

4

Environments as folders or branches

Promote from staging to production by changing the image tag in the prod config, through a PR.

Image updaters can open those PRs for you.

In production

Tools and technologies

GitOps controllers run in most Kubernetes platforms.

Not tied to one language — use these names when you search docs or design a system.