What are the core principles of GitOps?

Answer

GitOps is defined by four principles introduced by Weaveworks. Declarative: the entire system (infrastructure and applications) is described declaratively — you declare the desired end state, not the steps to achieve it (Kubernetes manifests, Terraform HCL). Versioned and Immutable: the desired state is stored in Git, providing immutability, an audit trail, and the ability to roll back by reverting commits. Pulled Automatically: approved desired state changes are applied to the system automatically — the GitOps agent (ArgoCD, Flux) running inside the cluster continuously pulls from Git and applies changes, rather than CI pushing to the cluster. Continuously Reconciled: software agents continuously compare the actual cluster state to the desired Git state and automatically correct any drift (e.g., someone manually kubectl-applied a change that is not in Git). These principles result in a system where Git is the single source of truth, all operations are auditable, and the cluster is always in a known, reproducible state.