Understanding GitOps Core Concepts
The Day Configuration Drift Cost Us $12,000
# Check production cluster
kubectl get deployments -n production
# api-service: 3 replicas β
# worker-service: 50 replicas β WHAT?!
kubectl describe deployment worker-service
# Replicas: 50
# Last scaled: 2 weeks ago by [email protected]Declarative Infrastructure
Imperative Approach (The Problem)
Declarative Approach (The Solution)
Desired State vs Actual State
Example: Desired vs Actual
Reconciliation Loops
The Reconciliation Process
Real Example: Auto-Healing
Reconciliation Configuration
Git Workflows for GitOps
Workflow 1: Branch Per Environment
Workflow 2: Directory Per Environment
Workflow 3: Kustomize Overlays (Best Practice)
Workflow 4: App Repo + Config Repo (Separation)
Pull vs Push Deployments
Push-Based Deployment (Traditional CI/CD)
Pull-Based Deployment (GitOps)
Security Comparison
Drift Detection and Remediation
How Drift Happens
ArgoCD Drift Detection
Handling Legitimate Drift
The GitOps Control Loop
Key Takeaways
Last updated