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 →
- Look at the diff:
argocd app diff checkout
- Common causes: an HPA changing
spec.replicaswhile Git setsreplicas: 3; a mutating webhook injecting sidecars or labels; a controller adding defaults; a CRD whose fields normalise differently. - Fix the source: remove
replicasfrom the manifest when an HPA owns it. - For legitimate external mutations, tell Argo to ignore them:
spec:
ignoreDifferences:
- group: apps
kind: Deployment
jsonPointers:
- /spec/replicas
- 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.
More on Deployments and releases
A deploy went out and p99 latency doubled. Walk me through it.IntermediateYou deployed a new version and half the pods are in CrashLoopBackOff. What do you do?BeginnerA release passed every test in staging but broke in production. How do you investigate?IntermediateHow would you design a zero-downtime deployment for a stateless API on Kubernetes?BeginnerEvery deploy causes a short spike of 502 errors from the ALB. Why, and how do you fix it?IntermediateHow would you set up a canary release, and what decides whether it gets promoted?Intermediate