Course contentsShow
← Cloud and Infrastructure
Lesson 1854 of 2,98939. GitOps PrinciplesFree lesson

The Four Principles of GitOps

Declarative configuration, versioned in Git, automatically applied, and continuously reconciled.

The Four Principles of GitOps

What you'll learn: The four fundamental principles that define GitOps as a methodology for managing infrastructure and applications.

The Core Principles

GitOps operates on four foundational principles that distinguish it from traditional operations approaches. Think of these as the "constitution" of GitOps—rules that must all be present for something to truly be GitOps.

1. Declarative Configuration

Your entire system is described declaratively—you state what you want, not how to achieve it. Infrastructure, application configs, and policies are expressed in files (YAML, JSON, etc.) that describe the desired end state, just like you declare "I want a three-bedroom house" rather than providing construction instructions.

2. Versioned and Immutable

All declarative configurations are stored in Git as the single source of truth. Every change creates a new commit, providing a complete audit trail. You can see who changed what, when, and why—plus roll back to any previous state instantly.

3. Automatically Applied

Changes committed to Git are automatically applied to your systems without manual intervention. An agent or operator continuously watches the Git repository and pulls changes to apply them. This is pull-based deployment, unlike traditional CI/CD that pushes changes.

4. Continuously Reconciled

Software agents continuously observe the actual system state and compare it to the desired state in Git. When drift occurs—someone manually changes a server, or a pod crashes—the system automatically corrects itself to match Git. It's self-healing by design.

Why All Four Matter

You need all four principles working together. Without declarative configs, automation is brittle. Without version control, you lose auditability. Without automatic application, you're back to manual operations. Without continuous reconciliation, your system drifts from the desired state.

Key Takeaway: GitOps requires all four principles—declarative configuration stored in versioned Git repositories, automatically applied to systems, and continuously reconciled to prevent drift—working together as a cohesive methodology.