DevOpsil
gitopsHigh

Fix: ArgoCD Application Sync Failed — OutOfSync

ArgoCD app status shows OutOfSync with sync failed

!Symptoms

  • ArgoCD app status shows OutOfSync with sync failed
  • Deployment not updating despite Git changes
  • Sync operation shows errors in the ArgoCD UI
  • Resources stuck in Progressing state after sync

?Root Causes

  • Invalid Kubernetes manifests in the Git repo
  • Helm chart values mismatch or template rendering error
  • Namespace doesn't exist and auto-create is disabled
  • RBAC permissions insufficient for ArgoCD to apply resources
  • Resource already managed by another controller (conflict)

#Diagnosis Steps

  1. 1Check ArgoCD UI: click on the failed sync for detailed error messages
  2. 2Run `argocd app get <app-name>` to see sync status and conditions
  3. 3Check ArgoCD application controller logs: `kubectl logs -n argocd -l app.kubernetes.io/name=argocd-application-controller`
  4. 4Validate manifests locally: `helm template . | kubectl apply --dry-run=client -f -`
  5. 5Check sync diff: `argocd app diff <app-name>`

>Fix

  1. 1Fix the manifest errors in Git and push — ArgoCD will auto-retry
  2. 2Create the missing namespace manually or enable auto-create in the AppProject
  3. 3Fix RBAC: ensure ArgoCD service account has permissions for the resource types
  4. 4Force sync with prune: `argocd app sync <app-name> --prune`
  5. 5For resource conflicts, add the ArgoCD tracking annotation manually

*Prevention

  • Validate manifests in CI before merging (kubeval, kube-linter, helm lint)
  • Use ArgoCD sync waves for ordered deployment of dependencies
  • Enable auto-prune to remove resources deleted from Git
  • Set up sync failure notifications (Slack, email)
  • Use ApplicationSets for consistent multi-cluster deployments

Related Error Messages

ComparisonErrorfailed to sync: resource already existsnamespace not foundthe server does not allow this method on the requested resource