ArgoCD › GitOps Principles

What is configuration drift and how does GitOps handle it?

Intermediate

Answer

Drift is when the live cluster state diverges from the declared state in Git—e.g., someone manually edits a deployment. GitOps detects drift by continuously comparing live vs desired, marks the app OutOfSync, and can auto-heal by reapplying Git's state, restoring the intended configuration and preventing untracked changes.
spec:
  syncPolicy:
    automated:
      selfHeal: true   # revert manual drift back to Git state
Real-world example An engineer manually scales a deployment; ArgoCD flags OutOfSync and, with selfHeal on, reverts it to the Git-defined replica count.

Common follow-ups: What is selfHeal? | How is drift surfaced to users?