GitOps Principles
Weaveworks coined the term in 2017; OpenGitOps (CNCF, 2021) formalized it. Four principles: declarative, versioned + immutable, pulled automatically, continuously reconciled. The operational model that makes Kubernetes deployments auditable, recoverable, and rollback-trivial.
Overview
What GitOps is
GitOps is the operating model where git is the source of truth for declarative infrastructure and applications, and software agents continuously reconcile actual system state to match git. Alexis Richardson coined the term at Weaveworks in 2017; the OpenGitOps project (CNCF Sandbox since 2021) formalized the principles in v1.0 of the spec.
The picture has four players. An engineer changes git through a pull request and a merge. An agent that runs inside the cluster, Argo CD or Flux, pulls from git, diffs what git says against what the cluster runs, and reconciles the difference. CI still builds and tests, but it never pushes to the cluster.
Key concepts
- Declarative state
- Pull-based reconciliation
- Continuous reconciliation + drift remediation
- GitOps tools comparison
- Recipe: secrets in GitOps
Interview questions
- What are the four GitOps principles, and what does each rule out?
- Walk through what happens when you push a commit to a GitOps cluster.
- When does GitOps NOT fit, and what do you use instead?
- How do you handle secrets in a GitOps repo?
- Quick-fire interview answers — GitOps essentials.
Sign up free to read the full topic
More DevOps topics
Start free on Cariara · Coding problems · System design studio