AdvancedLesson 31 of 35
GitOps and multi-cluster
Git as the source of truth; a controller applies it.
With GitOps (Argo CD or Flux) the cluster pulls its desired state from a git repo and continuously reconciles it. Deployments become pull requests; rollbacks become reverts; drift is detected and corrected.
yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata: { name: web, namespace: argocd }
spec:
source:
repoURL: https://github.com/example/deploy
path: overlays/prod
targetRevision: main
destination: { server: https://kubernetes.default.svc, namespace: prod }
syncPolicy: { automated: { prune: true, selfHeal: true } }Multiple clusters (per region or environment) are managed with the same repo structure.