Interview Prep/GitOps & Argo CD/OutOfSync Loops & Diff Problems

`argocd app diff` shows only `replicas: 2` vs `replicas: 5` on a Deployment that has an HPA, and the app never stays Synced.

BeginnerTroubleshootingOutOfSync Loops & Diff Problems
Answer

Likely causes → The manifest declares spec.replicas while the HPA scales it.

Diagnose →

kubectl get hpa -n web
argocd app diff web

Fix → Remove replicas from the manifest (Helm: wrap it in {{- if not .Values.autoscaling.enabled }}), or:

ignoreDifferences:
  - group: apps
    kind: Deployment
    jsonPointers: [/spec/replicas]
syncPolicy:
  syncOptions: [RespectIgnoreDifferences=true]

Prevent → Standard chart pattern: never render replicas when autoscaling is enabled.

All GitOps & Argo CD questions Roadmap: Argo CD (GitOps)

More on OutOfSync Loops & Diff Problems