Category: GitOps Last Updated: 2026-01-18 Severity: High
- ArgoCD Application shows "OutOfSync" or "Unknown" status
- Application health status shows "Degraded" or "Progressing"
- Sync errors in ArgoCD UI or
kubectl describe - Changes pushed to Git but not reflected in cluster
- Error messages: "ComparisonError", "failed to generate manifest", "failed to list refs"
# Check Application sync status
kubectl get applications -n argocd
# Look for: SYNC STATUS = OutOfSync/Unknown, HEALTH = Degraded
# Get detailed Application status
kubectl get application <app-name> -n argocd -o jsonpath='{.status.sync.status}'
# Check for sync errors
kubectl describe application <app-name> -n argocd | grep -A 10 "Conditions:"Command:
kubectl describe application <app-name> -n argocdWhat to Look For:
- Conditions: Error messages explaining sync failure
- Sync Status: OutOfSync reasons
- Operation State: Last sync attempt result
- Resources: Which resources failed to sync
Command:
# Check repo-server logs
kubectl logs -n argocd -l app.kubernetes.io/name=argocd-repo-server --tail=50
# Look for: Git clone/fetch errors, authentication failures, network timeoutsCommon Errors:
failed to list refs: Can't connect to Git repositoryauthentication required: Missing or invalid credentialsdial tcp: i/o timeout: Network connectivity to GitHub
Command:
# Check for YAML parsing errors
kubectl describe application <app-name> -n argocd | grep -A 5 "ComparisonError"What to Look For:
- YAML syntax errors
- Invalid Kubernetes resource definitions
- Missing required fields
File to Check: argocd-apps/<app-name>.yaml
Command:
kubectl get application <app-name> -n argocd -o yaml | grep -A 10 "source:"What to Look For:
- Correct repository URL
- Valid branch/tag (targetRevision)
- Correct path to manifests
Indicators:
- Error:
dial tcp 10.43.233.191:6379: i/o timeout - ArgoCD Application status "Unknown"
- Sync hangs or times out
Solution:
-
Check Redis pod status:
kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-redis
-
If Redis not running, check deployment:
kubectl get deployment argocd-redis -n argocd kubectl describe deployment argocd-redis -n argocd
-
Restart Redis if needed:
kubectl rollout restart deployment/argocd-redis -n argocd
-
Force Application refresh:
kubectl patch application <app-name> -n argocd \ --type merge -p '{"metadata":{"annotations":{"argocd.argoproj.io/refresh":"hard"}}}'
Verification:
kubectl get application <app-name> -n argocd
# Status should update within 3 minutesIndicators:
- Error:
error converting YAML to JSON - Error:
yaml: line X: could not find expected ':' - ComparisonError in Application status
Solution:
-
Review recent commits for YAML changes:
git log --oneline -5 apps/<namespace>/
-
Validate YAML syntax:
kubectl apply --dry-run=client -f apps/<namespace>/<file>.yaml
-
Common YAML issues:
- Incorrect indentation
- Missing quotes around special characters
- Embedded code (Python f-strings, etc.) in ConfigMaps
- Frontmatter in markdown fields
-
Fix YAML and commit:
# Edit file to fix syntax git add apps/<namespace>/<file>.yaml git commit -m "Fix YAML syntax error in <file>" git push origin main
Verification:
# ArgoCD will auto-sync within 3 minutes
kubectl get application <app-name> -n argocd
# SYNC STATUS should become "Synced"Indicators:
- Application "OutOfSync" even though Git is up-to-date
- Resources marked "Requires Pruning: true"
- Manual changes made directly with kubectl
Solution:
-
Check which resources are out of sync:
kubectl describe application <app-name> -n argocd | grep "Requires Pruning"
-
Option 1: Let ArgoCD auto-heal (if enabled):
- Wait up to 3 minutes for auto-sync
- Self-heal will revert manual changes
-
Option 2: Manually sync Application:
# Sync with prune (removes manually created resources) kubectl patch application <app-name> -n argocd \ --type merge -p '{"operation":{"sync":{"prune":true}}}'
-
Option 3: Update Git to match cluster:
- Export current cluster state
- Update manifests in Git
- Commit changes
Prevention: Never use kubectl apply directly. Always update Git → ArgoCD → Cluster.
Verification:
kubectl get application <app-name> -n argocd
# SYNC STATUS = SyncedIndicators:
- Error:
authentication required: Repository not found - Error:
remote: Repository not found - Private repository access issues
Solution:
-
Check repository secret exists:
kubectl get secrets -n argocd | grep repo -
If using HTTPS with token, update secret:
kubectl create secret generic repo-<name> \ --from-literal=url=https://github.com/user/repo \ --from-literal=username=<username> \ --from-literal=password=<token> \ -n argocd --dry-run=client -o yaml | kubectl apply -f -
-
Add label to secret:
kubectl label secret repo-<name> -n argocd \ argocd.argoproj.io/secret-type=repository
Verification:
# Trigger refresh
kubectl patch application <app-name> -n argocd \
--type merge -p '{"metadata":{"annotations":{"argocd.argoproj.io/refresh":"hard"}}}'- Validate YAML before committing: Use
kubectl apply --dry-run=client - Monitor ArgoCD health: Check Application status regularly
- Never manual kubectl apply: Always commit to Git first
- Test in dev namespace: Validate changes before production
- Enable auto-sync: Let ArgoCD handle sync automatically
- Use pre-commit hooks: Validate YAML syntax in Git hooks
- Kaniko Build Timeouts - Image build issues
- YAML Syntax Errors - Manifest validation
- CLAUDE.md - GitOps workflow (Git → ArgoCD → Cluster)
- OPERATIONAL-PRINCIPLES.md - No manual deployments
- Date: 2026-01-18
- Commit:
c07013e- Convert chat services from LoadBalancer to NodePort - Issue: Application status "Unknown", sync failing
- Error:
failed to generate manifest: dial tcp 10.43.233.191:6379: i/o timeout - Root Cause: ArgoCD Redis connection timeout preventing manifest comparison
- Impact: Services marked "Requires Pruning: true", changes not syncing
- Resolution: Manually applied changes with
kubectl apply -fto bypass ArgoCD - Workaround: Direct kubectl apply (not ideal, violates GitOps)
- Proper Fix: Restart ArgoCD Redis, force refresh Application
- Date: 2026-01-18 (from session summary)
- Issue:
error parsing moe-router-build-job.yaml - Error:
error converting YAML to JSON: yaml: line 94: could not find expected ':' - Root Cause: Python code embedded in ConfigMap with f-strings and dict notation that YAML parser interpreted as YAML syntax
- Example:
data: code: | def classify(message: str) -> dict: """Returns: {expert: str, confidence: float}""" # YAML saw this as mapping
- Resolution: Changed docstring to plain text, moved to inline RUN command approach
- Lesson: Avoid complex code in YAML ConfigMaps, use separate files or escape properly
When to use this playbook:
- ArgoCD Application shows OutOfSync/Unknown status
- Changes committed to Git but not appearing in cluster
- Sync errors in ArgoCD logs or UI
- Resources stuck in "Requires Pruning" state
When NOT to use this playbook:
- Application Synced but pods crashing → See CrashLoop BackOff
- Application Synced but service unreachable → See Service Connectivity
- Git repository not accessible at all → Check GitHub status or network
Escalation:
- If Redis timeouts persist → Check ArgoCD resource limits
- If YAML valid but still fails → Check ArgoCD version compatibility
- If all Applications failing → Check ArgoCD controller logs for systemic issues