What is GitOps, and what changes about how you deploy compared with running deploy commands from a CI pipeline?
technical-conceptual · Junior level · cloud-devops-security
What the interviewer is really asking
Assess whether the candidate understands GitOps as making Git the single source of truth for declared cluster state, with an in-cluster agent continuously pulling and reconciling that state — versus a CI pipeline pushing changes — and can name the operational benefits (auditability, drift correction, easy rollback).
What to say
- Define GitOps: the desired state of your system (Kubernetes manifests, Helm values) lives in Git as the single source of truth, and an agent running in the cluster continuously reconciles the live state to match what's in Git.
- Contrast push vs pull: in classic CI-driven deploys, the pipeline holds cluster credentials and pushes changes out; in GitOps the cluster pulls from Git itself, so the credentials stay inside the cluster and a git merge — not a pipeline run — is what triggers a deploy.
- Name the wins: every change is a reviewed, audited Git commit (so the repo is your deploy history and you roll back with git revert), and the agent detects and corrects drift, re-applying the declared state if someone changes the cluster by hand.
What to avoid
- Describing GitOps as just 'storing your YAML in Git' — the defining part is the agent that continuously reconciles the cluster to that Git state, not merely keeping files in a repo.
- Confusing it with ordinary CI/CD that pushes deploys — the pull-based, reconcile-from-Git model and drift correction are what make it GitOps.
- Forgetting the security angle: with pull-based GitOps you avoid handing broad cluster credentials to an external CI system.
Example answers
Strong: GitOps makes Git the source of truth: I open a PR that changes the manifest, it gets reviewed and merged, and an in-cluster agent notices the new commit and applies it — no one runs kubectl. The big difference from our old pipeline is rollback: instead of a special rollback job, I just git revert the commit and the agent converges the cluster back. The repo history is literally our deploy log.
Weak: GitOps means you keep your Kubernetes YAML files in a Git repo instead of on your laptop.