Skip to main content
πŸŽ“ Claude Code Masterclass Learn AI-assisted development on Udemy β€” plus the companion book on Leanpub & Amazon. Start Learning
Fix ArgoCD ComparisonError
DevOps

Fix ArgoCD ComparisonError

ArgoCD showing ComparisonError for application? Debug manifest comparison failures, resource exclusions, and diff customization.

LB
Luca Berton
Β· 1 min read

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:

  1. CRD not installed: The application references a Custom Resource whose CRD is not yet installed
  2. Invalid manifests: YAML/JSON syntax errors or invalid Kubernetes API fields
  3. Resource too large: Kubernetes resources exceeding the annotation size limit
  4. 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=50

Resource 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-refresh

Prevention

  • Always install CRDs in a separate sync wave (-1 or earlier)
  • Use argocd app diff to validate before syncing
  • Set resource exclusions for cluster-managed resources
#argocd #gitops #kubernetes #troubleshooting #devops
Share:
Kubernetes & Containerization

Need help with Kubernetes & Containerization?

Master Kubernetes and container orchestration with hands-on workshops and architecture consulting.

Learn more about Kubernetes & Containerization

Want to operate this yourself, in production?

Take the free AI Platform Engineer Readiness Scorecard to see which skills transfer β€” then build a production-shaped AI platform in the 4-week Bootcamp.

Take the Scorecard β†’
Luca Berton β€” The Production AI Expert, Docker Captain

Luca Berton

The Production AI Expert Β· Docker Captain Β· KubeCon Speaker

15+ years in enterprise infrastructure. Author of 8 technical books, creator of Ansible Pilot (1M+ YouTube views, 648K site users). Former Red Hat engineer. Speaker at KubeCon EU 2026 and Red Hat Summit 2026.

Free 30-min Production AI consultation

Book Now