k8s-argocd-troubleshooting
Skill38 starsChanged 15 days agoApache-2.0View on GitHub
Use when Argo CD does not deploy or update an application in Kubernetes: an Application that is OutOfSync, Unknown, Degraded, Missing or Progressing, a ComparisonError ("app path does not exist", "unable to resolve ... to a commit SHA"), an InvalidSpecError ("do not match any of the allowed destinations in project"), a sync that fails ("one or more objects failed to apply"), auto-sync that never runs, resources that stay OutOfSync after a sync, or ApplicationSets that generate nothing. Investigates with kubectl get, describe, events and logs, and proposes fixes. Reads first and asks before changing anything.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- k8s-aks-troubleshootingSkill
- k8s-api-troubleshootingSkill
- k8s-autoscaling-troubleshootingSkill
- k8s-cert-manager-troubleshootingSkill
- k8s-cilium-troubleshootingSkill
- k8s-cloudnative-pg-troubleshootingSkill
- k8s-cluster-reviewSkill
- k8s-coredns-troubleshootingSkill
- k8s-envoy-gateway-troubleshootingSkill
- k8s-envoy-troubleshootingSkill
- k8s-external-secrets-troubleshootingSkill
- k8s-fluent-bit-troubleshootingSkill
- k8s-flux-troubleshootingSkill
- k8s-gatekeeper-troubleshootingSkill
- k8s-gateway-api-troubleshootingSkill
- k8s-grafana-troubleshootingSkill
- k8s-helm-troubleshootingSkill
- k8s-istio-troubleshootingSkill
- k8s-kyverno-troubleshootingSkill
- k8s-loki-troubleshootingSkill
- k8s-network-troubleshootingSkill
- k8s-node-troubleshootingSkill
- k8s-opentelemetry-collector-troubleshootingSkill
- k8s-prometheus-troubleshootingSkill
- k8s-rbac-troubleshootingSkill
- k8s-storage-troubleshootingSkill
- k8s-triageSkill
- k8s-upgrade-readinessSkill
- k8s-velero-troubleshootingSkill
- k8s-workload-troubleshootingSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Read first, ask before changing: Run the investigation commands freely.
- Very specific: line 38
Never read Secrets. Argo CD keeps repository credentials, cluster credentials and its own settings in Secrets (argocd-secret, and Secrets …
- Distinctive: line 167
Ask Argo CD to compare again now, for example after fixing the repository (the controller removes the annotation when it is done):
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Argo CD troubleshooting
Find out why Argo CD does not deploy or update an application, and propose a fix. Read first, ask before changing. Run the investigation commands freely. Run a command under an "Ask first" line only after the user approves that exact command; if your credentials do not allow it, give it to the user to run. Never run a "Proposed fix"; hand it to the user.
An Application says: render this path of this repository at this revision, and
apply it to this destination. Argo CD compares the rendered manifests with the cluster
and reports two things: sync status (does the cluster match Git: Synced,
OutOfSync, Unknown) and health (do the deployed objects work: Healthy,
Progressing, Degraded, Missing, Suspended). Conditions on the Application say
why it could not compare or sync. An AppProject limits which repositories,
destinations and kinds an Application may use.
The commands use placeholders: argocd (where Argo CD and its Applications live, the
default), my-app (the Application) and my-namespace (where it deploys). Replace them
with the real names.
Never read Secrets. Argo CD keeps repository credentials, cluster credentials and its
own settings in Secrets (argocd-secret, and Secrets labelled
argocd.argoproj.io/secret-type). Read the ConfigMaps instead (argocd-cm,
argocd-rbac-cm, argocd-cmd-params-cm); the Application's conditions say when a
credential is missing or wrong.
When to use
- An Application shows
OutOfSync,Unknown,Degraded,MissingorProgressingfor longer than expected. - A change merged to Git never reaches the cluster.
- A sync fails, or resources go
OutOfSyncagain right after a sync. - An ApplicationSet creates no Applications, or the wrong ones.
Hand-offs, by skill name. When the evidence points elsewhere, continue with that skill; if it is not installed, keep going with the steps here and tell the user which skill would help:
- Argo CD synced, but the deployed pods fail (health
DegradedorProgressingbecause of crashes, images, probes, Pending):k8s-workload-troubleshooting. - The Argo CD components themselves crash or stay Pending:
k8s-workload-troubleshooting.
Investigate
Work through the steps in order. Stop when you have the cause and its evidence.
1. List the Applications with their sync and health status. The built-in view
role cannot read Applications (Argo CD adds nothing to it); if the command is
forbidden, say so and ask the user for the Application's status from the Argo CD UI or
CLI.
kubectl get applications -n argocd2. Read the Application: its source, destination, project, sync policy, conditions and the last sync operation.
kubectl describe application my-app -n argocd
kubectl get application my-app -n argocd -o jsonpath='{.spec.source}{"\n"}{.spec.destination}{"\n"}{.spec.project}{"\n"}{.spec.syncPolicy}{"\n"}'
kubectl get application my-app -n argocd -o jsonpath='{.status.conditions}{"\n"}{.status.sync}{"\n"}{.status.health}{"\n"}'
kubectl get application my-app -n argocd -o jsonpath='{.status.operationState.phase}{" "}{.status.operationState.message}{"\n"}'3. See which resources differ. Each entry of status.resources has a sync status;
the failed ones of the last sync have a message.
kubectl get application my-app -n argocd -o jsonpath='{range .status.resources[*]}{.kind}{" "}{.namespace}{"/"}{.name}{" "}{.status}{"\n"}{end}'
kubectl get application my-app -n argocd -o jsonpath='{range .status.operationState.syncResult.resources[*]}{.kind}{" "}{.name}{" "}{.status}{" "}{.message}{"\n"}{end}'4. Read the AppProject the Application uses: allowed source repositories, destinations and resource kinds.
kubectl get appprojects -n argocd
kubectl get appproject default -n argocd -o jsonpath='{.spec.sourceRepos}{"\n"}{.spec.destinations}{"\n"}{.spec.clusterResourceWhitelist}{"\n"}'5. If the conditions do not explain it, read the components. The repo-server renders manifests (Git and Helm errors), the application controller compares and syncs.
kubectl get pods -n argocd
kubectl logs -n argocd deployment/argocd-repo-server --tail=100 | grep my-app
kubectl logs -n argocd statefulset/argocd-application-controller --tail=200 | grep my-app
kubectl events -n argocd --for application/my-app6. Open the matching reference and follow its steps:
| What you see | Reference |
ComparisonError, Unknown sync status: app path does not exist, unable to resolve ... to a commit SHA, Helm or Kustomize errors, repository access | references/comparison-errors.md |
InvalidSpecError: destinations or repositories not permitted in the project, cluster not found | references/projects-and-destinations.md |
OutOfSync that never syncs, a failed sync, OutOfSync again after a sync, auto-sync skipped | references/sync.md |
Degraded, Progressing, Missing health; ApplicationSets that generate nothing | references/health-and-appsets.md |
Read the results
What the common findings mean (Argo CD 3.5):
- Sync
Unknownwith aComparisonErrorFailed to load target state: failed to generate manifest for source 1 of 1: ...: Argo CD could not render the manifests. The text at the end says why:<path>: app path does not exist(wrongpath),unable to resolve '<rev>' to a commit SHA(wrongtargetRevision), a Helm or Kustomize error, or repository access. - An
InvalidSpecErrorapplication destination server '<server>' and namespace '<ns>' do not match any of the allowed destinations in project '<project>': the AppProject does not allow that destination. Either the Application targets the wrong namespace or the project is missing a destination. OutOfSyncandMissing, no error, and no sync ever ran: the Application has nospec.syncPolicy.automated, so Argo CD only reports the difference and waits for someone to sync. This is not a fault, but often not what the user expects.- A sync
Failedwithone or more objects failed to apply, reason: ...: the API server refused an object; the per-resource message insyncResultis the API error. OutOfSyncagain right after a successful sync: something in the cluster changes the objects after Argo CD applies them (a mutating webhook, an operator, an HPA onreplicas), or the manifest has defaults the API server fills in differently.- Health
DegradedorProgressingwith syncSynced: Argo CD did its part; the deployed workload is not healthy.
State the cause in one sentence, then the evidence you saw (the condition and its message, the spec field, the project rule), then the proposed fix.
Proposed fix
Show each fix to the user before running it: what it changes and how to undo it. Asking Argo CD to refresh, starting one sync and patching an Application's spec are reversible, so they go under "Ask first" and run only after the user says yes. Changing AppProjects, repository or cluster credentials, syncing with prune or replace, and deleting Applications are never run by you: hand them to the user as proposed fixes. Applications are often themselves managed from Git (app-of-apps, ApplicationSets, or a GitOps repository for Argo CD); a patch on the live Application is then reverted, so propose the change in Git. Write each undo with the values you found.
Point an Application at the right path (to test before fixing Git; the undo puts back the value you found in step 2):
Ask first: the agent runs this only after the user approves it.
kubectl patch application my-app -n argocd --type=merge -p '{"spec": {"source": {"path": "guestbook"}}}'
# Undo: kubectl patch application my-app -n argocd --type=merge -p '{"spec": {"source": {"path": "guestbook-ui"}}}'Ask Argo CD to compare again now, for example after fixing the repository (the controller removes the annotation when it is done):
Ask first: the agent runs this only after the user approves it.
kubectl annotate application my-app -n argocd argocd.argoproj.io/refresh=normal --overwrite
# Undo: nothing to undo; the annotation only asks for one refreshSync once, without prune, when the user wants the current Git revision deployed and
the Application has no automated sync (initiatedBy records who asked):
Ask first: the agent runs this only after the user approves it.
kubectl patch application my-app -n argocd --type=merge -p '{"operation": {"initiatedBy": {"username": "my-user"}, "sync": {"revision": "master"}}}'
# Undo: sync the revision of the previous entry in status.history the same way; objects this sync created stay until removed with prune, which is for the userTurning on automated sync is a change to how the Application behaves from then on;
propose it in the source, with the user deciding on prune and selfHeal.
Sources
Checked against the Argo CD 3.5 documentation and source (v3.5.6):
- Troubleshooting and the FAQ.
- Sync with kubectl
and annotations and labels:
the
operationfield and the refresh annotation. - Diffing customization and resource tracking.
- Projects and automated sync.
- Installation and the upgrade notes for 3.x.
- Status types and messages from the source: types.go, path.go, argo.go, appcontroller.go. The messages quoted here were also seen on a Kubernetes 1.37 kind cluster with Argo CD 3.5.6.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

