{"slug":"k8s-argocd-troubleshooting","title":"k8s-argocd-troubleshooting","summary":"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 ","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-10-30T17:36:45.986152Z","repo":{"url":"https://github.com/k8s-servant/k8s-skills","stars":38,"forks":7,"license":"Apache-2.0","updatedAt":"2026-11-14T21:06:02Z"},"bodyHtml":"<hr>\n<h2>name: k8s-argocd-troubleshooting\ndescription: &gt;-\nUse when Argo CD does not deploy or update an application in Kubernetes: an\nApplication that is OutOfSync, Unknown, Degraded, Missing or Progressing, a\nComparisonError (\"app path does not exist\", \"unable to resolve ... to a commit SHA\"),\nan InvalidSpecError (\"do not match any of the allowed destinations in project\"), a\nsync that fails (\"one or more objects failed to apply\"), auto-sync that never runs,\nresources that stay OutOfSync after a sync, or ApplicationSets that generate nothing.\nInvestigates with kubectl get, describe, events and logs, and proposes fixes. Reads\nfirst and asks before changing anything.\nlicense: Apache-2.0\nmetadata:\nverified-with: \"kubernetes 1.37, argo-cd 3.5\"\nverified-on: \"2026-10-24\"</h2>\n<h1>Argo CD troubleshooting</h1>\n<p>Find out why Argo CD does not deploy or update an application, and propose a fix.\n<strong>Read first, ask before changing.</strong> Run the investigation commands freely. Run a\ncommand under an \"Ask first\" line only after the user approves that exact command; if\nyour credentials do not allow it, give it to the user to run. Never run a \"Proposed\nfix\"; hand it to the user.</p>\n<p>An <strong>Application</strong> says: render this path of this repository at this revision, and\napply it to this destination. Argo CD compares the rendered manifests with the cluster\nand reports two things: <strong>sync status</strong> (does the cluster match Git: <code>Synced</code>,\n<code>OutOfSync</code>, <code>Unknown</code>) and <strong>health</strong> (do the deployed objects work: <code>Healthy</code>,\n<code>Progressing</code>, <code>Degraded</code>, <code>Missing</code>, <code>Suspended</code>). Conditions on the Application say\nwhy it could not compare or sync. An <strong>AppProject</strong> limits which repositories,\ndestinations and kinds an Application may use.</p>\n<p>The commands use placeholders: <code>argocd</code> (where Argo CD and its Applications live, the\ndefault), <code>my-app</code> (the Application) and <code>my-namespace</code> (where it deploys). Replace them\nwith the real names.</p>\n<p>Never read Secrets. Argo CD keeps repository credentials, cluster credentials and its\nown settings in Secrets (<code>argocd-secret</code>, and Secrets labelled\n<code>argocd.argoproj.io/secret-type</code>). Read the ConfigMaps instead (<code>argocd-cm</code>,\n<code>argocd-rbac-cm</code>, <code>argocd-cmd-params-cm</code>); the Application's conditions say when a\ncredential is missing or wrong.</p>\n<h2>When to use</h2>\n<ul>\n<li>An Application shows <code>OutOfSync</code>, <code>Unknown</code>, <code>Degraded</code>, <code>Missing</code> or <code>Progressing</code>\nfor longer than expected.</li>\n<li>A change merged to Git never reaches the cluster.</li>\n<li>A sync fails, or resources go <code>OutOfSync</code> again right after a sync.</li>\n<li>An ApplicationSet creates no Applications, or the wrong ones.</li>\n</ul>\n<p>Hand-offs, by skill name. When the evidence points elsewhere, continue with that skill;\nif it is not installed, keep going with the steps here and tell the user which skill\nwould help:</p>\n<ul>\n<li>Argo CD synced, but the deployed pods fail (health <code>Degraded</code> or <code>Progressing</code> because\nof crashes, images, probes, Pending): <code>k8s-workload-troubleshooting</code>.</li>\n<li>The Argo CD components themselves crash or stay Pending:\n<code>k8s-workload-troubleshooting</code>.</li>\n</ul>\n<h2>Investigate</h2>\n<p>Work through the steps in order. Stop when you have the cause and its evidence.</p>\n<p><strong>1. List the Applications</strong> with their sync and health status. The built-in <code>view</code>\nrole cannot read Applications (Argo CD adds nothing to it); if the command is\nforbidden, say so and ask the user for the Application's status from the Argo CD UI or\nCLI.</p>\n<pre><code>kubectl get applications -n argocd\n</code></pre>\n<p><strong>2. Read the Application</strong>: its source, destination, project, sync policy, conditions\nand the last sync operation.</p>\n<pre><code>kubectl describe application my-app -n argocd\nkubectl get application my-app -n argocd -o jsonpath='{.spec.source}{\"\\n\"}{.spec.destination}{\"\\n\"}{.spec.project}{\"\\n\"}{.spec.syncPolicy}{\"\\n\"}'\nkubectl get application my-app -n argocd -o jsonpath='{.status.conditions}{\"\\n\"}{.status.sync}{\"\\n\"}{.status.health}{\"\\n\"}'\nkubectl get application my-app -n argocd -o jsonpath='{.status.operationState.phase}{\" \"}{.status.operationState.message}{\"\\n\"}'\n</code></pre>\n<p><strong>3. See which resources differ.</strong> Each entry of <code>status.resources</code> has a sync status;\nthe failed ones of the last sync have a message.</p>\n<pre><code>kubectl get application my-app -n argocd -o jsonpath='{range .status.resources[*]}{.kind}{\" \"}{.namespace}{\"/\"}{.name}{\" \"}{.status}{\"\\n\"}{end}'\nkubectl get application my-app -n argocd -o jsonpath='{range .status.operationState.syncResult.resources[*]}{.kind}{\" \"}{.name}{\" \"}{.status}{\" \"}{.message}{\"\\n\"}{end}'\n</code></pre>\n<p><strong>4. Read the AppProject</strong> the Application uses: allowed source repositories,\ndestinations and resource kinds.</p>\n<pre><code>kubectl get appprojects -n argocd\nkubectl get appproject default -n argocd -o jsonpath='{.spec.sourceRepos}{\"\\n\"}{.spec.destinations}{\"\\n\"}{.spec.clusterResourceWhitelist}{\"\\n\"}'\n</code></pre>\n<p><strong>5. If the conditions do not explain it, read the components.</strong> The repo-server\nrenders manifests (Git and Helm errors), the application controller compares and syncs.</p>\n<pre><code>kubectl get pods -n argocd\nkubectl logs -n argocd deployment/argocd-repo-server --tail=100 | grep my-app\nkubectl logs -n argocd statefulset/argocd-application-controller --tail=200 | grep my-app\nkubectl events -n argocd --for application/my-app\n</code></pre>\n<p><strong>6. Open the matching reference</strong> and follow its steps:</p>\n<table>\n<thead>\n<tr>\n<th>What you see</th>\n<th>Reference</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>ComparisonError</code>, <code>Unknown</code> sync status: <code>app path does not exist</code>, <code>unable to resolve ... to a commit SHA</code>, Helm or Kustomize errors, repository access</td>\n<td><a href=\"references/comparison-errors.md\">references/comparison-errors.md</a></td>\n</tr>\n<tr>\n<td><code>InvalidSpecError</code>: destinations or repositories not permitted in the project, cluster not found</td>\n<td><a href=\"references/projects-and-destinations.md\">references/projects-and-destinations.md</a></td>\n</tr>\n<tr>\n<td><code>OutOfSync</code> that never syncs, a failed sync, <code>OutOfSync</code> again after a sync, auto-sync skipped</td>\n<td><a href=\"references/sync.md\">references/sync.md</a></td>\n</tr>\n<tr>\n<td><code>Degraded</code>, <code>Progressing</code>, <code>Missing</code> health; ApplicationSets that generate nothing</td>\n<td><a href=\"references/health-and-appsets.md\">references/health-and-appsets.md</a></td>\n</tr>\n</tbody>\n</table>\n<h2>Read the results</h2>\n<p>What the common findings mean (Argo CD 3.5):</p>\n<ul>\n<li><strong>Sync <code>Unknown</code> with a <code>ComparisonError</code></strong> <code>Failed to load target state: failed to generate manifest for source 1 of 1: ...</code>: Argo CD could not render the manifests.\nThe text at the end says why: <code>&lt;path&gt;: app path does not exist</code> (wrong <code>path</code>),\n<code>unable to resolve '&lt;rev&gt;' to a commit SHA</code> (wrong <code>targetRevision</code>), a Helm or\nKustomize error, or repository access.</li>\n<li><strong>An <code>InvalidSpecError</code></strong> <code>application destination server '&lt;server&gt;' and namespace '&lt;ns&gt;' do not match any of the allowed destinations in project '&lt;project&gt;'</code>: the\nAppProject does not allow that destination. Either the Application targets the wrong\nnamespace or the project is missing a destination.</li>\n<li><strong><code>OutOfSync</code> and <code>Missing</code>, no error, and no sync ever ran</strong>: the Application has no\n<code>spec.syncPolicy.automated</code>, so Argo CD only reports the difference and waits for\nsomeone to sync. This is not a fault, but often not what the user expects.</li>\n<li><strong>A sync <code>Failed</code> with <code>one or more objects failed to apply, reason: ...</code></strong>: the API\nserver refused an object; the per-resource message in <code>syncResult</code> is the API error.</li>\n<li><strong><code>OutOfSync</code> again right after a successful sync</strong>: something in the cluster\nchanges the objects after Argo CD applies them (a mutating webhook, an operator, an\nHPA on <code>replicas</code>), or the manifest has defaults the API server fills in differently.</li>\n<li><strong>Health <code>Degraded</code> or <code>Progressing</code></strong> with sync <code>Synced</code>: Argo CD did its part; the\ndeployed workload is not healthy.</li>\n</ul>\n<p>State the cause in one sentence, then the evidence you saw (the condition and its\nmessage, the spec field, the project rule), then the proposed fix.</p>\n<h2>Proposed fix</h2>\n<p>Show each fix to the user before running it: what it changes and how to undo it.\nAsking Argo CD to refresh, starting one sync and patching an Application's spec are\nreversible, so they go under \"Ask first\" and run only after the user says yes.\nChanging AppProjects, repository or cluster credentials, syncing with prune or replace,\nand deleting Applications are never run by you: hand them to the user as proposed\nfixes. Applications are often themselves managed from Git (app-of-apps, ApplicationSets,\nor a GitOps repository for Argo CD); a patch on the live Application is then reverted,\nso propose the change in Git. Write each undo with the values you found.</p>\n<p>Point an Application at the right path (to test before fixing Git; the undo puts back the\nvalue you found in step 2):</p>\n<blockquote>\n<p>Ask first: the agent runs this only after the user approves it.</p>\n</blockquote>\n<pre><code>kubectl patch application my-app -n argocd --type=merge -p '{\"spec\": {\"source\": {\"path\": \"guestbook\"}}}'\n# Undo: kubectl patch application my-app -n argocd --type=merge -p '{\"spec\": {\"source\": {\"path\": \"guestbook-ui\"}}}'\n</code></pre>\n<p>Ask Argo CD to compare again now, for example after fixing the repository (the\ncontroller removes the annotation when it is done):</p>\n<blockquote>\n<p>Ask first: the agent runs this only after the user approves it.</p>\n</blockquote>\n<pre><code>kubectl annotate application my-app -n argocd argocd.argoproj.io/refresh=normal --overwrite\n# Undo: nothing to undo; the annotation only asks for one refresh\n</code></pre>\n<p>Sync once, without prune, when the user wants the current Git revision deployed and\nthe Application has no automated sync (<code>initiatedBy</code> records who asked):</p>\n<blockquote>\n<p>Ask first: the agent runs this only after the user approves it.</p>\n</blockquote>\n<pre><code>kubectl patch application my-app -n argocd --type=merge -p '{\"operation\": {\"initiatedBy\": {\"username\": \"my-user\"}, \"sync\": {\"revision\": \"master\"}}}'\n# 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 user\n</code></pre>\n<p>Turning on automated sync is a change to how the Application behaves from then on;\npropose it in the source, with the user deciding on <code>prune</code> and <code>selfHeal</code>.</p>\n<h2>Sources</h2>\n<p>Checked against the Argo CD 3.5 documentation and source (v3.5.6):</p>\n<ul>\n<li><a href=\"https://argo-cd.readthedocs.io/en/stable/operator-manual/troubleshooting/\">Troubleshooting</a>\nand the <a href=\"https://argo-cd.readthedocs.io/en/stable/faq/\">FAQ</a>.</li>\n<li><a href=\"https://argo-cd.readthedocs.io/en/stable/user-guide/sync-kubectl/\">Sync with kubectl</a>\nand <a href=\"https://argo-cd.readthedocs.io/en/stable/user-guide/annotations-and-labels/\">annotations and labels</a>:\nthe <code>operation</code> field and the refresh annotation.</li>\n<li><a href=\"https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/\">Diffing customization</a>\nand <a href=\"https://argo-cd.readthedocs.io/en/stable/user-guide/resource_tracking/\">resource tracking</a>.</li>\n<li><a href=\"https://argo-cd.readthedocs.io/en/stable/user-guide/projects/\">Projects</a> and\n<a href=\"https://argo-cd.readthedocs.io/en/stable/user-guide/auto_sync/\">automated sync</a>.</li>\n<li><a href=\"https://argo-cd.readthedocs.io/en/stable/getting_started/\">Installation</a> and the\n<a href=\"https://argo-cd.readthedocs.io/en/stable/operator-manual/upgrading/overview/\">upgrade notes</a>\nfor 3.x.</li>\n<li>Status types and messages from the source:\n<a href=\"https://github.com/argoproj/argo-cd/blob/v3.5.6/pkg/apis/application/v1alpha1/types.go\">types.go</a>,\n<a href=\"https://github.com/argoproj/argo-cd/blob/v3.5.6/util/app/path/path.go\">path.go</a>,\n<a href=\"https://github.com/argoproj/argo-cd/blob/v3.5.6/util/argo/argo.go\">argo.go</a>,\n<a href=\"https://github.com/argoproj/argo-cd/blob/v3.5.6/controller/appcontroller.go\">appcontroller.go</a>.\nThe messages quoted here were also seen on a Kubernetes 1.37 kind cluster with Argo\nCD 3.5.6.</li>\n</ul>\n","files":[{"path":".claude-plugin/plugin.json","sizeBytes":975,"isText":true},{"path":"references/comparison-errors.md","sizeBytes":2418,"isText":true},{"path":"references/health-and-appsets.md","sizeBytes":2228,"isText":true},{"path":"references/projects-and-destinations.md","sizeBytes":2291,"isText":true},{"path":"references/sync.md","sizeBytes":3118,"isText":true},{"path":"SKILL.md","sizeBytes":11425,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-11-19T20:41:05.344533Z","sha256":"FE49CABA3B74FB8563B3B5A701B730B0C7B4004239270149434934F16F0B5546","sizeBytes":9999},"review":null,"source":{"repositoryUrl":"https://github.com/k8s-servant/k8s-skills","path":"skills/k8s-argocd-troubleshooting","license":"Apache-2.0","commit":"0229910c2618f9021ed9f4eb0b5a4fb33fb55581","subtreeSha":"697E9A1EDDFD52E0641CECFFCE2870082DF3FD95511BB4BBA09A009A92E7261E","lastSyncedAt":"2026-11-19T20:40:43.768112Z"},"reviewedAt":"2026-11-19T20:41:18.543205Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/k8s-servant/k8s-skills/tree/main/skills/k8s-argocd-troubleshooting"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install k8s-servant-k8s-skills@llmmart"},{"target":"git","command":"git clone https://github.com/k8s-servant/k8s-skills.git"}]}