12.2. GitOps and CI/CD
GitOps makes Git the single source of truth for infrastructure: the desired state of the system lives in a repository, and an operator continuously reconciles the cluster to match it — so every change is reviewed, versioned, and revertible, and drift is detected and corrected automatically. This chapter covers the GitOps principles, the ArgoCD and Flux operators that implement them, progressive delivery that automates canary analysis, and the pipeline-as-code and artifact-management practices that make the whole path from commit to production reproducible.
Topics Covered
Section titled “Topics Covered”- 12.2.1. GitOps Principles: Git as the Single Source of Truth: Establishes GitOps: Git as the single source of truth, with continuous reconciliation and drift correction.
- 12.2.2. ArgoCD and Flux: GitOps Operators for Kubernetes: Compares ArgoCD and Flux, the two GitOps operators that reconcile a cluster to its Git-declared state.
- 12.2.3. Progressive Delivery: Automated Canary Releases with Flagger: Explains progressive delivery with Flagger and Argo Rollouts that automate metric-driven canary analysis.
- 12.2.4. Pipeline as Code: Reproducible CI/CD: Covers defining CI/CD pipelines as version-controlled code for reproducible, reviewable builds.
- 12.2.5. Artifact Management: OCI Registry and Helm Charts: Explains artifact management with OCI registries and Helm charts as the deployable units of a release.
- 12.2.6. Environment Promotion: Dev to Staging to Production: Covers promoting a validated artifact through dev, staging, and production environments.