The principles
- The desired state is declared, for example as Kubernetes manifests.
- It is stored in Git and versioned.
- An agent in the cluster pulls changes and applies them.
- The agent keeps correcting drift.
The tools
Argo CD and Flux are two widely used CNCF projects that do this for Kubernetes. They watch a repository and reconcile the cluster with it.
Benefits
- Every change is reviewed and recorded.
- Rollback is a revert.
- Rebuilding an environment is repeatable.
Adding policy
Policy-as-code tools check changes against rules before they are applied, for example blocking images from unapproved registries. Keep secrets out of Git, and use a secrets manager instead.
Sources and further reading
- OpenGitOps. GitOps Principles. opengitops.dev.
- Argo CD. argo-cd.readthedocs.io.
IICTP is a new independent credential and is not ISO/IEC 17024 accredited.