ArgoCDReview - ArgoCD CLI Review & Troubleshooting
Comprehensive ArgoCD CLI commands for reviewing applications, diagnosing issues, and managing deployments.
This skill provides structured commands for inspecting ArgoCD application state, comparing live manifests against Git, reviewing deployment history, and troubleshooting sync failures.
Prerequisites
ArgoCD CLI installed (argocd)
Logged into ArgoCD server: argocd login
Verify connection
argocd version argocd account get-user-info
Quick Reference Commands Application Status Overview
List all applications with status
argocd app list
Get detailed app status (health, sync, resources)
argocd app get
Get app status as JSON (for scripting)
argocd app get
Wide output with more columns
argocd app list -o wide
Health & Sync Status
Check sync status only
argocd app get
List all OutOfSync applications
argocd app list --sync-status OutOfSync
List all Degraded applications
argocd app list --health-status Degraded
List applications by project
argocd app list --project
Workflow Routing Workflow Trigger File ReviewApplication "review app", "check app status", "app health" Workflows/ReviewApplication.md DiffManifests "diff app", "compare live vs desired", "what changed" Workflows/DiffManifests.md TroubleshootSync "sync failed", "why not syncing", "sync errors" Workflows/TroubleshootSync.md RollbackApp "rollback", "revert deployment", "previous version" Workflows/RollbackApp.md ReviewResources "list resources", "app resources", "managed resources" Workflows/ReviewResources.md Core Review Operations 1. Application Diff (Live vs Desired)
Compare what's deployed vs what Git says should be deployed:
Show diff between live state and Git
argocd app diff
Show diff with local manifests
argocd app diff
Server-side manifest generation (recommended for Helm/Kustomize)
argocd app diff
- View Application Manifests
Show desired manifests (from Git)
argocd app manifests
Show live manifests (from cluster)
argocd app manifests
Get specific resource manifest
argocd app get-resource
- Deployment History
View deployment history
argocd app history
Output example:
ID DATE REVISION
0 2025-01-10 10:00:00 +0000 UTC abc1234 (HEAD)
1 2025-01-09 15:30:00 +0000 UTC def5678 (v1.2.0)
2 2025-01-08 09:00:00 +0000 UTC 789abcd (v1.1.0)
- Resource Tree & Details
Show resource tree
argocd app resources
Show resource tree with health status
argocd app resources
Get specific resource details
argocd app get-resource
Sync Operations Safe Sync (Preview First)
Preview what would sync (dry-run)
argocd app sync
Sync single application
argocd app sync
Sync and wait for completion
argocd app sync
Sync specific resources only
argocd app sync
Selective Sync
Sync by label selector
argocd app sync -l app.kubernetes.io/instance=my-app
Sync multiple apps
argocd app sync app1 app2 app3
Sync excluding specific resources
argocd app sync
Force Sync (Use with Caution)
Force sync (replaces resources)
argocd app sync
Force sync with prune (deletes removed resources)
argocd app sync
Sync with replace strategy
argocd app sync
Rollback Operations
View history first
argocd app history
Rollback to specific history ID
argocd app rollback
Rollback without confirmation
argocd app rollback
Rollback and wait for completion
argocd app rollback
Troubleshooting Commands Sync Failure Diagnosis
Get detailed sync operation status
argocd app get
View sync operation result
argocd app get
Check for resource errors
argocd app resources
Application Logs
View logs for app's pods
argocd app logs
Follow logs
argocd app logs
Logs for specific container
argocd app logs
Logs for specific group/kind
argocd app logs
Resource Events
Get Kubernetes events for app resources
kubectl get events -n
Common Diagnostic Scenarios Scenario 1: App Stuck in "Progressing"
1. Check what's progressing
argocd app resources
2. Find stuck resources (usually Deployments)
argocd app get
3. Check pod events
kubectl describe deployment
Scenario 2: App Shows "OutOfSync" but Won't Sync
1. Check diff
argocd app diff
2. Check for ignored differences
argocd app get
3. Check sync policy
argocd app get
4. Force refresh from Git
argocd app get
Scenario 3: Health Status "Degraded"
1. Find unhealthy resources
argocd app resources
2. Get resource details
argocd app get-resource
3. Check pod status
kubectl get pods -n
Multi-Source Applications
For applications with multiple sources:
Sync with specific source revisions
argocd app sync
Sync by source name
argocd app sync
Best Practices Checklist Always run argocd app diff before syncing Use --dry-run for sync operations in production Check deployment history before rollback Review resource tree when troubleshooting health Use JSON output for scripting: -o json Set appropriate timeouts for sync operations Examples
Example 1: Review failing application
User: "Why is my-app not healthy?" → Run argocd app get my-app --show-operation → Check argocd app resources my-app --tree → Identify Degraded resources → Investigate with kubectl describe
Example 2: Compare live vs desired state
User: "What changed in production?" → Run argocd app diff my-app → Shows line-by-line diff → Identify configuration drift
Example 3: Rollback after bad deployment
User: "Rollback my-app to previous version"
→ Run argocd app history my-app
→ Identify target history ID
→ Run argocd app rollback my-app
Related Tools kubectl: For direct cluster inspection k9s: Interactive Kubernetes dashboard stern: Multi-pod log tailing kubectx/kubens: Context and namespace switching