Skip to content

ArgoCD Troubleshooting

This guide provides solutions for common ArgoCD issues and troubleshooting steps for maintaining a healthy ArgoCD deployment.

Symptoms:

  • Application shows “OutOfSync” status
  • Sync operations fail or time out

Troubleshooting Steps:

  1. Check for sync errors in the status:

    Terminal window
    kubectl get application <app-name> -n argocd -o jsonpath='{.status.conditions}' | jq
  2. Check resource constraints:

    Terminal window
    kubectl top pod -n argocd
  3. Examine application controller logs:

    Terminal window
    kubectl logs -n argocd -l app.kubernetes.io/name=argocd-application-controller -c argocd-application-controller

Solutions:

  • Force a refresh of the application:

    Terminal window
    kubectl patch application <app-name> -n argocd --type=merge -p '{"metadata":{"annotations":{"argocd.argoproj.io/refresh":"hard"}}}'
  • Restart the application controller:

    Terminal window
    kubectl rollout restart deployment argocd-application-controller -n argocd

Issue: Resource is “Progressing” Forever

Section titled “Issue: Resource is “Progressing” Forever”

Symptoms:

  • Resources stay in “Progressing” health status
  • Deployments never reach ready state

Troubleshooting Steps:

  1. Check the health status details:

    Terminal window
    kubectl get application <app-name> -n argocd -o jsonpath='{.status.resources}' | jq 'map(select(.health.status=="Progressing"))'
  2. Check the problematic resource directly:

    Terminal window
    kubectl describe <resource-kind> <resource-name> -n <resource-namespace>

Solutions:

  • Check for resource constraints in target namespace
  • Verify the image exists and is accessible
  • Check for pod errors using kubectl describe pod

Issue: Resources Out of Sync but No Changes

Section titled “Issue: Resources Out of Sync but No Changes”

Symptoms:

  • Application shows “OutOfSync” but Git comparison shows no differences

Solutions:

  • Enable resource tracking via labels:

    Terminal window
    kubectl patch application <app-name> -n argocd --type=merge -p '{"spec":{"syncPolicy":{"syncOptions":["CreateNamespace=true","RespectIgnoreDifferences=true"]}}}'
  • Add ignore differences for fields that change frequently:

    Terminal window
    kubectl patch application <app-name> -n argocd --type=merge -p '{"spec":{"ignoreDifferences":[{"group":"apps","kind":"Deployment","jsonPointers":["/spec/replicas"]}]}}'

Issue: ApplicationSet Not Generating Applications

Section titled “Issue: ApplicationSet Not Generating Applications”

Symptoms:

  • No applications are created from an ApplicationSet
  • Only some of the expected applications are created

Troubleshooting Steps:

  1. Check ApplicationSet controller logs:

    Terminal window
    kubectl logs -n argocd -l app.kubernetes.io/name=argocd-applicationset-controller
  2. Verify the ApplicationSet spec:

    Terminal window
    kubectl get applicationset <appset-name> -n argocd -o yaml

Solutions:

  • Restart the ApplicationSet controller:

    Terminal window
    kubectl rollout restart deployment argocd-applicationset-controller -n argocd
  • Check if your generator (git, list, cluster, etc.) is correctly configured

  • Verify Git repository access and credentials

Symptoms:

  • Unable to connect to Git repository
  • “connection refused” or SSL errors

Troubleshooting Steps:

  1. Check repository secret:

    Terminal window
    kubectl get secret <repo-secret> -n argocd -o yaml
  2. Test connection using ArgoCD CLI:

    Terminal window
    argocd repo list

Solutions:

  • Update repository credentials
  • Check network policies that might be blocking outbound connections
  • Verify SSL certificates for private repositories

Run a quick diagnostic on all ArgoCD components:

Terminal window
kubectl get pods -n argocd
kubectl top pod -n argocd
kubectl describe statefulset,deployment -n argocd

If a component is in a bad state:

Terminal window
# Force restart the component
kubectl rollout restart deployment <component-name> -n argocd
# For example, to restart the API server:
kubectl rollout restart deployment argocd-server -n argocd
Terminal window
# Check server status
kubectl exec -it $(kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-server -o name | head -n 1) -n argocd -- argocd admin server health
  1. Export the corrupted application:

    Terminal window
    kubectl get application <app-name> -n argocd -o yaml > corrupted-app.yaml
  2. Delete the application without cascade:

    Terminal window
    kubectl delete application <app-name> -n argocd --cascade=false
  3. Edit the exported YAML to fix issues, then reapply:

    Terminal window
    kubectl apply -f fixed-app.yaml

If the ArgoCD Redis database is corrupted:

Terminal window
# Backup before attempting recovery
kubectl get all,secrets,configmaps,applications,appprojects -n argocd -o yaml > argocd-backup.yaml
# Delete and recreate Redis
kubectl delete pod -n argocd -l app.kubernetes.io/name=argocd-redis
Terminal window
# Check resource usage
kubectl top pod -n argocd
# Scale up application controller if needed
kubectl scale deployment argocd-application-controller -n argocd --replicas=2
# Adjust application controller processing parallelism
kubectl edit configmap argocd-cmd-params-cm -n argocd
# Add --application-controller-operation-processors=10

For clusters with many applications:

Terminal window
# Set higher limits for the controller
kubectl patch deployment argocd-application-controller -n argocd --type=json -p='[{"op":"replace","path":"/spec/template/spec/containers/0/resources/limits","value":{"cpu":"2","memory":"4Gi"}}]'