Argo cluster debug
AI Agent Skills for Argo CD, Rollouts, Workflows, and Events — knowledge, repo auditing, cluster debugging, and operations
npx -y skills add alimobrem/argo-skills --skill argo-cluster-debugAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Debug and troubleshoot the Argo ecosystem on live Kubernetes clusters — inspects Argo CD Application sync status, health checks, and controller logs; diagnoses Argo Rollouts canary/blue-green failures and AnalysisRun results; traces Argo Workflow step failures and artifact issues; and debugs Argo Events EventSource and Sensor connectivity. Prefers argocd/argo CLIs when available, falls back to kubectl for CRD inspection. Use when users report failing, stuck, or degraded Argo resources on a cluster.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
26.0 KB, as published. Nobody here has run it
Argo Cluster Debug
Debug and troubleshoot the full Argo ecosystem on live Kubernetes clusters.
Prerequisites
| Tool | Required | Purpose |
|---|---|---|
| kubectl | Yes | CRD inspection, pod logs, resource status |
| argocd | No | Richer Application output, diff, sync operations |
| argo | No | Workflow logs, node inspection |
| kubectl-argo-rollouts | No | Rollout status, step details, promotion |
How This Skill Works
The debug skill provides systematic workflows — each is a sequence of checks that traces the problem from surface symptoms to root cause. The value is in the completeness of the investigation, not just finding the first error.
Before starting any workflow:
- Check which CLIs are available (argocd, argo, kubectl-argo-rollouts, kubectl)
- Confirm the current cluster context
- Load
references/troubleshooting.md— it maps symptoms to causes and saves time
General rules:
- Prefer specialized CLIs when available (richer output), fall back to
kubectl get -o yaml - Read-only by default — never sync, promote, or delete unless explicitly asked
- Analyze
.status.conditionsas the primary diagnostic signal for every Argo CRD - Complete the full workflow — don't stop after finding one issue, cascading problems are common
Cluster Context
- If the user specifies a cluster context, switch to it:
If using argocd CLI with a remote server:kubectl config use-context <context-name>argocd context <context-name> - If no cluster is specified, use the current context. Confirm it:
kubectl config current-context - Always verify Argo CD installation before Application/ApplicationSet debugging. Check for the argocd namespace and CRDs.
Debugging Workflows
Execute the workflow that matches the user's problem. Each workflow is self-contained. Work through the steps in order — each step builds context for the next.
Workflow 1: Argo CD Installation Check
Use when: user asks if Argo CD is installed, reports general Argo CD failures, or as a prerequisite before Application debugging.
Steps:
-
Check for Argo CD CRDs:
kubectl get crd | grep argoproj.ioExpected CRDs:
applications.argoproj.io,appprojects.argoproj.io,applicationsets.argoproj.io. If missing, Argo CD is not installed. -
Identify the Argo CD namespace. It defaults to
argocdbut can be customized:kubectl get pods --all-namespaces -l app.kubernetes.io/part-of=argocd --no-headers | awk '{print $1}' | sort -u -
Check all pods in the Argo CD namespace:
kubectl get pods -n argocd -o wide -
Verify core components are running. All required components must be
RunningwithREADYcontainers:Component Label Selector Required argocd-server app.kubernetes.io/name=argocd-serverYes argocd-repo-server app.kubernetes.io/name=argocd-repo-serverYes argocd-application-controller app.kubernetes.io/name=argocd-application-controllerYes argocd-applicationset-controller app.kubernetes.io/name=argocd-applicationset-controllerYes argocd-redis app.kubernetes.io/name=argocd-redisYes argocd-dex-server app.kubernetes.io/name=argocd-dex-serverYes argocd-notifications-controller app.kubernetes.io/name=argocd-notifications-controllerNo (optional) Note:
argocd-notifications-controlleris not deployed in all installations. Its absence should not be treated as a failure. -
If argocd CLI is available, check version compatibility:
argocd versionCompare client and server versions. Mismatches beyond minor version can cause issues.
-
Check the argocd-cm ConfigMap for server configuration:
kubectl get configmap argocd-cm -n argocd -o yamlLook for:
url(server URL),repositories(legacy repo config),resource.customizations(custom health checks),kustomize.buildOptions,configManagementPlugins. -
Check argocd-rbac-cm for RBAC configuration:
kubectl get configmap argocd-rbac-cm -n argocd -o yamlLook for:
policy.default,policy.csv,scopes. -
If any component is CrashLoopBackOff or not ready, get its logs:
kubectl logs -n argocd -l app.kubernetes.io/name=<component-name> --tail=100 --previous kubectl logs -n argocd -l app.kubernetes.io/name=<component-name> --tail=100 -
Check Argo CD events:
kubectl get events -n argocd --sort-by='.lastTimestamp' | tail -30
Workflow 2: Application Debugging
Use when: user reports Application sync failure, health degradation, OutOfSync, or unknown status.
Steps:
-
Get the Application resource:
- argocd CLI:
argocd app get <name> -o yaml - kubectl:
kubectl get application <name> -n argocd -o yaml
If the Application is in a non-default namespace, the user must specify it or check:
kubectl get applications --all-namespaces | grep <name> - argocd CLI:
-
Extract and assess sync status from
.status.sync.status:Status Meaning Synced Live state matches desired state OutOfSync Live state differs from desired state Unknown Comparison could not be performed -
Extract and assess health status from
.status.health.status:Status Meaning Healthy All resources healthy Degraded One or more resources failed Progressing Resources are being rolled out Suspended Resource is paused (e.g., suspended CronJob, paused Rollout) Missing Resource does not exist in the cluster Unknown Health assessment not available -
Check
.status.conditionsfor error messages. Common conditions:ComparisonError— manifest generation failedSyncError— sync operation failedInvalidSpecError— Application spec is invalidOrphanedResourceWarning— resources exist outside the Application's management
-
Check
.status.operationStatefor the last sync operation:.status.operationState.phase— Succeeded, Failed, Error, Running.status.operationState.message— error detail.status.operationState.syncResult.resources— per-resource sync results
-
If OutOfSync, analyze the diff:
- argocd CLI:
argocd app diff <name> - kubectl: inspect
.status.resourcesand comparestatusfield per resource. Look for resources withstatus: OutOfSync.
- argocd CLI:
-
Check the source configuration. Applications may use either
spec.source(single-source) orspec.sources[](multi-source, GA since v2.6). Check both:# Check if multi-source kubectl get application <name> -n argocd -o jsonpath='{.spec.sources}' 2>/dev/null | grep -q '\[' && echo "multi-source" || echo "single-source" # Single-source kubectl get application <name> -n argocd -o jsonpath='{.spec.source}' | python3 -m json.tool # Multi-source — iterate all sources kubectl get application <name> -n argocd -o jsonpath='{range .spec.sources[*]}repoURL={.repoURL} targetRevision={.targetRevision} path={.path} chart={.chart}{"\n"}{end}'For multi-source Applications, each source can fail independently — verify
repoURL,targetRevision,path, and HelmvalueFilesfor every entry inspec.sources[]. -
If repo-server is failing to render manifests, check repo-server logs:
kubectl logs -n argocd -l app.kubernetes.io/name=argocd-repo-server --tail=100 -
Inspect managed resources. List resources from
.status.resourceswith non-Healthy or non-Synced status:kubectl get application <name> -n argocd -o jsonpath='{range .status.resources[*]}{.kind}/{.namespace}/{.name}: sync={.status}, health={.health.status}{"\n"}{end}' -
For each unhealthy managed resource, inspect it:
kubectl get <kind> <name> -n <namespace> -o yaml kubectl describe <kind> <name> -n <namespace> kubectl get events -n <namespace> --field-selector involvedObject.name=<name> -
If managed resource is a Deployment/StatefulSet with failing pods:
kubectl get pods -n <namespace> -l <label-selector> --sort-by='.status.startTime' kubectl logs -n <namespace> <pod-name> --tail=100 kubectl logs -n <namespace> <pod-name> --previous --tail=100 -
Produce a root cause analysis report (see Report Format).
Workflow 3: ApplicationSet Debugging
Use when: user reports ApplicationSet not generating Applications, generating wrong Applications, or ApplicationSet errors.
Steps:
-
Get the ApplicationSet:
kubectl get applicationset <name> -n argocd -o yaml -
Check
.status.conditionsfor errors. Key conditions:ErrorOccurred— generator or template rendering failedParametersGenerated— generator output statusResourcesUpToDate— template application status
-
Identify the generator type and check its configuration:
Generator Common Issues list Empty elementsarraygit (directories) repoURLinaccessible,directoriespath pattern wronggit (files) File format invalid, path pattern wrong cluster No matching clusters, label selector wrong pull request API credentials missing/expired, no open PRs matching filter scmProvider API credentials missing, org/owner wrong matrix/merge Inner generator errors, key conflicts plugin Plugin ConfigMap missing, generator RPC error -
List generated Applications:
kubectl get applications -n argocd -l 'app.kubernetes.io/managed-by=applicationset-controller' --show-labelsCross-reference with expected output from the generator.
-
If no Applications generated, check the applicationset-controller logs:
kubectl logs -n argocd -l app.kubernetes.io/name=argocd-applicationset-controller --tail=200 -
If some Applications are generated but failing, debug each one using Workflow 2.
-
For progressive sync issues, check
spec.strategy:kubectl get applicationset <name> -n argocd -o jsonpath='{.spec.strategy}' | python3 -m json.toolCheck
rollingSync.steps,maxUpdatevalues, and whether unhealthy apps are blocking progression.
Workflow 4: Rollout Debugging
Use when: user reports canary/blue-green rollout stuck, aborted, or degraded.
Steps:
-
Get the Rollout status:
- kubectl-argo-rollouts:
kubectl argo rollouts get rollout <name> -n <namespace> - kubectl:
kubectl get rollout <name> -n <namespace> -o yaml
- kubectl-argo-rollouts:
-
Check the phase from
.status.phase:Phase Meaning Healthy Rollout completed successfully Paused Waiting for manual promotion or analysis Progressing Actively rolling out Degraded Rollout encountered errors Aborting Rollback in progress Aborted Rollback completed -
For canary rollouts, check current step and step index:
kubectl get rollout <name> -n <namespace> -o jsonpath='{.status.currentStepIndex}' kubectl get rollout <name> -n <namespace> -o jsonpath='{.spec.strategy.canary.steps}'Identify which step the rollout is paused/stuck at.
-
If paused, determine the reason:
pausestep: manual approval required. Check.status.pauseConditions.analysisstep: AnalysisRun in progress. Proceed to step 5.setWeightstep: traffic shift issue. Proceed to step 8.
-
Get AnalysisRuns for this Rollout:
kubectl get analysisrun -n <namespace> --sort-by='.metadata.creationTimestamp'Filter by Rollout ownership:
kubectl get analysisrun -n <namespace> -o yaml | grep -A5 'ownerReferences' | grep '<rollout-name>'Or use the revision label:
kubectl get analysisrun -n <namespace> -l rollouts-pod-template-hash=<hash> -
Inspect the AnalysisRun:
kubectl get analysisrun <analysisrun-name> -n <namespace> -o yamlCheck:
.status.phase— Running, Successful, Failed, Error, Inconclusive.status.metricResults[*].phase— per-metric status.status.metricResults[*].measurements— individual measurement values.status.metricResults[*].message— error messages from the provider
-
If analysis failed, check the AnalysisTemplate:
kubectl get analysistemplate <template-name> -n <namespace> -o yamlVerify:
successCondition/failureConditionexpressionsproviderconfiguration (Prometheus URL, Datadog API key, web query, etc.)interval,count,failureLimit,inconclusiveLimit
-
Check traffic management configuration:
- Istio:
kubectl get virtualservice -n <namespace> -o yaml kubectl get destinationrule -n <namespace> -o yaml - NGINX Ingress:
Checkkubectl get ingress -n <namespace> -o yamlcanary-*annotations. - ALB:
Checkkubectl get ingress -n <namespace> -o yamlalb.ingress.kubernetes.io/*annotations. - Traefik:
kubectl get traefikservice -n <namespace> -o yaml
- Istio:
-
Check ReplicaSets — compare stable vs canary:
kubectl get replicaset -n <namespace> -l app=<app-label> -o wideThe stable RS has the
rollouts-pod-template-hashmatching.status.stableRS, canary RS matches.status.currentPodHash. -
Check pod status for the canary ReplicaSet:
kubectl get pods -n <namespace> -l rollouts-pod-template-hash=<canary-hash> kubectl describe pods -n <namespace> -l rollouts-pod-template-hash=<canary-hash> -
Produce a root cause analysis report.
Workflow 5: Workflow Debugging
Use when: user reports Workflow failure, stuck steps, or errors.
Steps:
-
Get the Workflow:
- argo CLI:
argo get <name> -n <namespace> - kubectl:
kubectl get workflow <name> -n <namespace> -o yaml
- argo CLI:
-
Check the phase from
.status.phase:Phase Meaning Pending Not yet scheduled Running Actively executing Succeeded All steps completed Failed One or more steps failed Error System error (not step failure) Omitted Step skipped by when condition Skipped Node skipped because whenexpression evaluated to false or a dependency failed -
If the Workflow is Failed or Error, identify the failed node(s) from
.status.nodes:kubectl get workflow <name> -n <namespace> -o jsonpath='{range .status.nodes[*]}{.displayName}: {.phase} - {.message}{"\n"}{end}' | grep -E 'Failed|Error' -
Get logs for the failed node:
- argo CLI:
argo logs <name> -n <namespace> --node-id <node-id> - kubectl (the pod name is the node ID):
kubectl logs <pod-name> -n <namespace> -c main --tail=200
Also check the
waitcontainer for artifact/sidecar issues:kubectl logs <pod-name> -n <namespace> -c wait --tail=100 - argo CLI:
-
Check for common failure patterns:
Pattern Indicator ImagePullBackOff Pod event shows image pull failure OOMKilled Container lastState.terminated.reason=OOMKilledDeadline exceeded .status.messagecontains "exceeded its deadline"Artifact error waitcontainer logs show S3/GCS/Artifactory errorsResource quota Pod event shows "exceeded quota" Pod security Pod event shows SecurityContext violation Node selector Pod event shows "didn't match Pod's node affinity" -
If using a DAG template, trace the dependency chain:
kubectl get workflow <name> -n <namespace> -o jsonpath='{.spec.templates[?(@.dag)].dag.tasks[*]}' | python3 -m json.toolIdentify which upstream task's failure caused downstream omissions.
-
If using
templateReforworkflowTemplateRef, check the referenced template:kubectl get workflowtemplate <template-name> -n <namespace> -o yamlOr for cluster-scoped:
kubectl get clusterworkflowtemplate <template-name> -o yaml -
Check the ServiceAccount and its permissions:
kubectl get workflow <name> -n <namespace> -o jsonpath='{.spec.serviceAccountName}' kubectl get rolebinding,clusterrolebinding -n <namespace> -o yaml | grep -A5 <service-account-name> -
If Pending, check the Workflow controller logs:
kubectl logs -n argo -l app=workflow-controller --tail=100The controller namespace may differ — check:
kubectl get pods --all-namespaces -l app=workflow-controller -
For CronWorkflow issues:
kubectl get cronworkflow <name> -n <namespace> -o yamlCheck
.status.lastScheduledTime,.status.active,spec.concurrencyPolicy,spec.timezone. -
Produce a root cause analysis report.
Workflow 6: EventSource / Sensor Debugging
Use when: user reports events not flowing, Sensor not triggering, or EventSource failures.
Steps:
-
Check the EventBus first — it is the backbone:
kubectl get eventbus -n <namespace> -o yamlVerify the EventBus pods are running:
kubectl get pods -n <namespace> -l controller=eventbusFor NATS-based EventBus:
kubectl get statefulset -n <namespace> -l eventbus-name=<eventbus-name> -
Get the EventSource:
kubectl get eventsource <name> -n <namespace> -o yaml -
Check EventSource
.status.conditions:Condition Healthy State Deployed True DependenciesProvided True SourceReady True -
If EventSource is not ready, check its pods:
kubectl get pods -n <namespace> -l eventsource-name=<name> kubectl logs -n <namespace> -l eventsource-name=<name> --tail=100 -
For webhook EventSources, verify network connectivity:
kubectl get svc -n <namespace> -l eventsource-name=<name> kubectl get ingress -n <namespace> | grep <eventsource-name> -
Get the Sensor:
kubectl get sensor <name> -n <namespace> -o yaml -
Check Sensor
.status.conditions:Condition Healthy State Deployed True DependenciesProvided True SensorReady True TriggersProvided True -
If Sensor is deployed but not triggering, check:
- Dependencies: each dependency must reference a valid EventSource and event name
- Filters:
filters.data,filters.context,filters.timemay be excluding events - Event dependency expression:
spec.dependencies[*].eventSourceNameandspec.dependencies[*].eventNamemust match the EventSource's event keys
-
Check Sensor pod logs for event receipt and trigger execution:
kubectl logs -n <namespace> -l sensor-name=<name> --tail=200 -
If triggers are failing, check the trigger template:
- For
k8striggers: verify the RBAC for the Sensor ServiceAccount to create the target resourcekubectl get sa -n <namespace> -l sensor-name=<name> # Note: -n <target-namespace> is the namespace where the resource will be created, # not necessarily the ServiceAccount's namespace. The --as flag uses the SA's namespace. kubectl auth can-i create workflows --as=system:serviceaccount:<sa-namespace>:<sa-name> -n <target-namespace> - For
httptriggers: verify the URL, TLS, and payload - For
aws-lambda,slack, etc.: check credentials in referenced Secrets
- For
-
Trace the full pipeline:
EventSource (ingests) -> EventBus (transports) -> Sensor (filters & triggers) -> Target ResourceCheck each component in order. The break is usually at the first unhealthy component.
-
Produce a root cause analysis report.
Workflow 7: Log Analysis
Use for any Argo component when logs are needed.
Steps:
-
Identify the Deployment managing the target pods:
kubectl get deployment -n <namespace> -l <label-selector> -
Extract the label selector and container name:
kubectl get deployment <deployment-name> -n <namespace> -o jsonpath='{.spec.selector.matchLabels}' | python3 -m json.tool kubectl get deployment <deployment-name> -n <namespace> -o jsonpath='{.spec.template.spec.containers[*].name}' -
List pods with matching labels:
kubectl get pods -n <namespace> -l <key=value> --sort-by='.status.startTime' -
Get logs — prefer
--tailto limit output:kubectl logs <pod-name> -n <namespace> -c <container> --tail=200For previous instance (after crash):
kubectl logs <pod-name> -n <namespace> -c <container> --previous --tail=200 -
Analyze logs for:
level=erroror"error"entries- Stack traces
- Connection refused / timeout patterns
- RBAC denied messages
- OOM or resource pressure signals
- Repeated restart patterns (check timestamps)
Report Format
Every debugging session must conclude with a structured report.
1. Summary
| Field | Value |
|---|---|
| Cluster Context | <context-name> |
| Argo Component | CD / Rollouts / Workflows / Events |
| Component Versions | e.g., Argo CD v2.14.2 |
| Resource | <kind>/<namespace>/<name> |
| Current Status | Sync/Health/Phase status |
2. Resource Analysis
- Spec: key configuration details (source, strategy, template)
- Status Conditions: each condition with type, status, message, timestamp
- Events: relevant Kubernetes events
3. Dependency Chain
Map the full dependency chain relevant to the problem:
- Argo CD:
Git Repo -> Repo Server -> Application -> Managed Resources -> Pods - Rollouts:
Rollout -> ReplicaSets -> Pods,Rollout -> AnalysisRun -> Metric Provider - Workflows:
Workflow -> DAG/Steps -> Pods -> Artifacts - Events:
EventSource -> EventBus -> Sensor -> Trigger Target
4. Root Cause
State the identified root cause with supporting evidence:
- The specific error message or condition
- The resource and field where the failure originates
- The chain of causation from root cause to observed symptom
5. Recommendations
Prioritized list of actions:
- BLOCKER — must fix to restore functionality
- HIGH — significant risk if not addressed
- MEDIUM — best practice violation contributing to the issue
- LOW — improvement for reliability or observability
Edge Cases
Handle these scenarios explicitly:
| Scenario | Behavior |
|---|---|
| Argo CD not installed (no argocd namespace or CRDs) | Report "Argo CD is not installed on this cluster" and stop Application/AppSet workflows |
| argocd CLI not logged in | Detect FATAL: Argo CD server address unspecified and suggest argocd login <server> |
| Multiple Argo CD instances | If multiple namespaces found, list them and ask user to specify |
| Application in Progressing state | Note that the resource is actively reconciling — wait 60s and re-check before diagnosing |
| Suspended Application or Rollout | Report as intentional suspension, do not treat as error unless user says otherwise |
| Unknown health status | Check for custom health check Lua scripts in argocd-cm under resource.customizations.health.<group_kind> |
| Rollout without traffic management | Note that canary is replica-based only — weight percentages are approximated by replica ratio |
| Workflow pods cleaned up by GC | Report that logs are unavailable due to pod GC — suggest increasing spec.podGC.strategy or checking archived workflows |
| CronWorkflow not firing | Check spec.timezone, spec.concurrencyPolicy, spec.startingDeadlineSeconds, and whether previous run is still active |
| Argo Events NATS cluster split | Check NATS pod logs for cluster connectivity, check PDB and pod anti-affinity |
| Helm source with missing values files | Check spec.source.helm.valueFiles paths relative to the chart, not the repo root |
| Multi-source Application | Iterate all entries in spec.sources[] — each source can fail independently |
Argo CRD Reference
All CRDs use apiVersion: argoproj.io/v1alpha1 unless noted:
| Kind | Project | Description |
|---|---|---|
| Application | Argo CD | Defines a deployed application |
| AppProject | Argo CD | Groups applications with RBAC and restrictions |
| ApplicationSet | Argo CD | Templated multi-cluster/multi-env application generation |
| Rollout | Argo Rollouts | Advanced deployment with canary/blue-green |
| AnalysisTemplate | Argo Rollouts | Metrics-based promotion criteria |
| ClusterAnalysisTemplate | Argo Rollouts | Cluster-scoped AnalysisTemplate |
| AnalysisRun | Argo Rollouts | Instance of an analysis execution |
| Experiment | Argo Rollouts | Temporary ReplicaSet for A/B testing |
| Workflow | Argo Workflows | DAG/step-based job execution (argoproj.io/v1alpha1) |
| WorkflowTemplate | Argo Workflows | Reusable workflow definition |
| ClusterWorkflowTemplate | Argo Workflows | Cluster-scoped WorkflowTemplate |
| CronWorkflow | Argo Workflows | Scheduled workflow execution |
| EventSource | Argo Events | Event ingestion (webhooks, SNS, SQS, etc.) |
| EventBus | Argo Events | Event transport (NATS, JetStream, Kafka) |
| Sensor | Argo Events | Event-driven trigger execution |