Interview Prep/Real-World Interview/Deployments and releases

Argo CD shows the application as "OutOfSync" right after a successful deploy and keeps re-syncing. Why?

IntermediateScenarioDeployments and releases
Answer

Situation read → Something in the cluster keeps mutating a field that Git defines differently, so Argo sees permanent drift.

What I'd do →

  1. Look at the diff:
argocd app diff checkout
  1. Common causes: an HPA changing spec.replicas while Git sets replicas: 3; a mutating webhook injecting sidecars or labels; a controller adding defaults; a CRD whose fields normalise differently.
  2. Fix the source: remove replicas from the manifest when an HPA owns it.
  3. For legitimate external mutations, tell Argo to ignore them:
spec:
  ignoreDifferences:
    - group: apps
      kind: Deployment
      jsonPointers:
        - /spec/replicas
  1. Check that nobody is kubectl edit-ing live resources; self-heal will fight them.

Why → A sync loop hides real drift in noise and can reset scaling during traffic peaks.

Interview tip → The HPA-versus-replicas conflict is the most common answer; lead with it.

All Real-World Interview questions Roadmap: Interview readiness

More on Deployments and releases