The Problem
ArgoCD shows ComparisonError status on your application. The UI displays a yellow warning and the application health cannot be determined.
Root Cause
ComparisonError occurs when ArgoCD cannot compare the desired state (Git) with the live state (cluster). Common causes:
- CRD not installed: The application references a Custom Resource whose CRD is not yet installed
- Invalid manifests: YAML/JSON syntax errors or invalid Kubernetes API fields
- Resource too large: Kubernetes resources exceeding the annotation size limit
- API server unreachable: ArgoCD repo-server or application-controller cannot reach the target cluster
Fix
CRD Not Installed
# Check if the CRD exists
kubectl get crd | grep your-resource-kind
# Install CRDs before deploying the application
# Option 1: Sync waves (install CRDs first)
# Add to CRD manifest:
# metadata:
# annotations:
# argocd.argoproj.io/sync-wave: "-1"Invalid Manifests
# Validate manifests locally
kubectl apply --dry-run=client -f manifests/
# Check ArgoCD repo-server logs
kubectl logs -n argocd deployment/argocd-repo-server --tail=50Resource Exclusions
If ArgoCD chokes on specific resources, exclude them:
# argocd-cm ConfigMap
data:
resource.exclusions: |
- apiGroups:
- cilium.io
kinds:
- CiliumIdentity
clusters:
- "*"Application-Level Fix
# Force a refresh
argocd app get my-app --refresh
# Hard refresh (clear cache)
argocd app get my-app --hard-refreshPrevention
- Always install CRDs in a separate sync wave (
-1or earlier) - Use
argocd app diffto validate before syncing - Set resource exclusions for cluster-managed resources
