🔄
Argo CD sync failed or OutOfSync
GitOps app stuck — compare diff, fix RBAC, hooks, or resource conflicts.
Reviewed: ·Tested on: Kubernetes 1.29, Terraform 1.8, Ubuntu 22.04
Symptoms
- Application sync failed in Argo CD UI
- OutOfSync with sync error in status
- Resource already exists or forbidden
1Inspect app status and diff
argocd app get <app> --refresh
argocd app diff <app>
kubectl get application <app> -n argocd -o yaml2Check sync logs and events
argocd app logs <app> --tail=50
kubectl describe application <app> -n argocd
kubectl get events -n <target-ns> --sort-by=.lastTimestamp | tail -203Common fixes
Replace vs merge conflict — use Replace=false. Hook failure — check PreSync job logs. RBAC — argocd-application-controller needs permissions.
# hard refresh + retry
argocd app sync <app> --force --prune
# if stuck finalizer:
kubectl patch application <app> -n argocd -p '{"metadata":{"finalizers":null}}' --type=merge