The Problem
Your ArgoCD application shows OutOfSync status even after syncing. The application never reaches Synced state.
Root Cause
OutOfSync means the live cluster state differs from the desired state in Git. Persistent OutOfSync usually means:
- Mutating webhooks or controllers modify resources after ArgoCD deploys them
- Default values added by Kubernetes that are not in your manifests
- Ignore differences not configured for fields that legitimately differ
Fix
Identify What Is Different
# Show the diff
argocd app diff my-app
# Detailed diff
argocd app diff my-app --local ./manifestsIgnore Expected Differences
# In your ArgoCD Application spec
spec:
ignoreDifferences:
- group: apps
kind: Deployment
jsonPointers:
- /spec/replicas # HPA manages replicas
- group: ""
kind: Service
jqPathExpressions:
- .metadata.annotations."cloud.google.com/neg-status"Common Fields to Ignore
| Field | Reason |
|---|---|
/spec/replicas | HPA or KEDA manages scaling |
/metadata/annotations | Controllers add annotations |
/metadata/labels | Admission webhooks add labels |
/status | Kubernetes updates status |
Force Sync
# Sync with prune
argocd app sync my-app --prune
# Sync specific resources only
argocd app sync my-app --resource apps:Deployment:my-deploy