What is GitOps?
What you'll learn: The definition, origins, and core philosophy of GitOps as a modern approach to infrastructure and operations.
Definition and Origins
GitOps is an operational framework that uses Git as the single source of truth for declarative infrastructure and application configuration. The term was coined by Weaveworks in 2017 to describe how they managed Kubernetes deployments, but its principles apply broadly across cloud infrastructure.
Think of GitOps like a blueprint-driven construction site: instead of workers making on-the-fly decisions, every change must first be drawn in the official blueprint (Git repository). The construction automatically follows the blueprint, ensuring what's built matches the approved design.
Core Philosophy
GitOps operates on four fundamental principles:
Declarative Configuration: Your entire system's desired state is described declaratively in Git (YAML, JSON, HCL, etc.). You specify what you want, not how to achieve it.
Version Control as Truth: Git becomes the authoritative source. Any change to infrastructure or applications goes through Git commits, pull requests, and reviews—just like application code.
Automated Synchronization: Automated agents continuously monitor Git and ensure the live environment matches the desired state. If someone manually changes production, the system automatically reverts it to match Git.
Continuous Reconciliation: The system constantly compares actual state with desired state and corrects any drift, creating self-healing infrastructure.
Why GitOps Matters
GitOps brings software development best practices—version control, code review, rollback, audit trails—to infrastructure management. Every change is tracked, auditable, and reversible. This contrasts sharply with manual deployments or scripts run from developer laptops.
Key Takeaway: GitOps treats Git as the single source of truth for infrastructure and operations, enabling declarative, version-controlled, and automatically synchronized infrastructure management with built-in audit trails and rollback capabilities.