Phase 5: GitOps & Multi-Cloud Control Planes
๐ง Beginner Mental Model (Explain Like Iโm 5)
- ArgoCD (GitOps): Think of a home thermostat. You set the target temperature in Git (
70ยฐF). ArgoCD sits inside your cluster watching the room 24/7โif someone opens a window (manualkubectl edit), ArgoCD automatically closes it so the live cluster always matches Git. - Argo Rollouts: Instead of switching 100% of users to new code at once, it sends 5% of traffic to the new version, checks Prometheus error rates automatically, and rolls back in 3 seconds if errors spike.
- Crossplane: Extends Kubernetes so
kubectl applycan provision AWS RDS databases, S3 buckets, and IAM roles using the exact same GitOps thermostat loop!
๐งญ Step-by-Step Execution Playbook for Phase 5
- Step 1 (Bootstrap GitOps): Configure ArgoCD App-of-Apps and Sync Waves in Lesson 1.
- Step 2 (Progressive Delivery): Automate Canary analysis with Argo Rollouts in Lesson 2.
- Step 3 (Cloud Control Planes): Build XRDs and KCL Compositions with Crossplane in Lesson 3.
- Step 4 (Multi-Cluster Scale): Scale across 50 clusters using ApplicationSet Matrix Generators (Lesson 4) and Hub-and-Spoke DR (Lesson 5).
๐ Deep-Dive Index
1. GitOps with ArgoCD & Progressive Delivery
- Pull vs Push: Why CI push is bad for infrastructure, why CD pull (reconciliation loops) is enterprise standard.
- ArgoCD Core: Applications, ApplicationSets (Git/List & Matrix Generators for multi-tenant multi-cluster fleet management), Sync Waves/Phases, self-healing, drift detection.
- Progressive Delivery (Argo Rollouts): Canary deployments, Automated Rollback triggers via Prometheus
AnalysisTemplate, Blue/Green traffic switching via Ingress/Gateway API. - Manifest Management: Helm (templating) vs Kustomize (patching/overlays).
2. Infrastructure as Data (Crossplane Control Planes)
- Architecture: Extending the K8s API via CRDs. Providers (AWS/Azure/GCP).
- Abstractions: Managed Resources (MRs), Composite Resource Definitions (XRDs), Composite Resources (XRs), Claims (XRCs).
- Modern Composition Pipelines: Crossplane Composition Functions with KCL (Configuration Language) for strongly-typed, schema-validated resource synthesis, replacing unmaintainable patch-and-transform YAML.
- Crossplane vs Terraform: Eventual consistency and continuous reconciliation vs discrete state updates, out-of-band console drift self-healing.
๐ ๏ธ Job-Essential Exercises
- The App of Apps Bootstrap:
- Create a Git repo. Structure it using the โApp of Appsโ pattern. Install ArgoCD on your cluster and point it to the root Application. Watch it recursively deploy Prometheus, Grafana, and an NGINX ingress controller simultaneously.
- Self-Healing Infrastructure & Drift Detection:
- Manually delete a Deployment that ArgoCD manages using
kubectl delete. Watch ArgoCD detect the drift and immediately recreate it to match the Git state.
- Manually delete a Deployment that ArgoCD manages using
- The Kubernetes Cloud Vending Machine (Crossplane & KCL):
- Install the Crossplane AWS provider. Create an XRD called
CustomDatabase. Write a Composition Function with KCL that provisions an AWS RDS instance, a Subnet Group, and a Security Group. Deploy a singleCustomDatabasemanifest to the cluster and watch Crossplane build the AWS resources.
- Install the Crossplane AWS provider. Create an XRD called