Troubleshooting
Real GitOps & ArgoCD errors and symptoms: likely causes, diagnosis, fix and prevention
OutOfSync Loops & Diff Problems
๐ฅ Learn this hands-on with DevOps Shack โ YouTube @devopsshack ยท Hindi @shackverse ยท Courses at devopsshack.com
Q1 An app flips between Synced and OutOfSync every few seconds and the sync history grows constantly.
Intermediate
Synced and OutOfSync every few seconds and the sync history grows constantly.Likely causes โ Self-heal fighting another writer: an HPA on replicas, an operator rewriting a field, a mutating webhook, or a second Application managing the same object.
Diagnose โ
argocd app diff web
argocd app history web | tail -20
kubectl get deploy web -n web -o yaml --show-managed-fields | grep -B2 -A8 managerFix โ Remove the contested field from Git, or add ignoreDifferences for it with RespectIgnoreDifferences=true. If two apps own the resource, give it one owner.
Prevent โ One owner per field; enable FailOnSharedResource=true; review managed fields when adopting operators.
Q2 argocd app diff shows only replicas: 2 vs replicas: 5 on a Deployment that has an HPA, and the app never stays Synced.
Beginner
argocd app diff shows only replicas: 2 vs replicas: 5 on a Deployment that has an HPA, and the app never stays Synced.Likely causes โ The manifest declares spec.replicas while the HPA scales it.
Diagnose โ
kubectl get hpa -n web
argocd app diff webFix โ Remove replicas from the manifest (Helm: wrap it in {{- if not .Values.autoscaling.enabled }}), or:
ignoreDifferences:
- group: apps
kind: Deployment
jsonPointers: [/spec/replicas]
syncPolicy:
syncOptions: [RespectIgnoreDifferences=true]Prevent โ Standard chart pattern: never render replicas when autoscaling is enabled.
Q3 A MutatingWebhookConfiguration is always OutOfSync on webhooks[0].clientConfig.caBundle.
Intermediate
webhooks[0].clientConfig.caBundle.Likely causes โ cert-manager's CA injector or the operator itself writes caBundle after Argo CD applies an empty or stale value.
Diagnose โ argocd app diff <app> shows caBundle changes only; kubectl get mutatingwebhookconfiguration <name> -o yaml shows the cert-manager.io/inject-ca-from annotation.
Fix โ
ignoreDifferences:
- group: admissionregistration.k8s.io
kind: MutatingWebhookConfiguration
jqPathExpressions:
- '.webhooks[]?.clientConfig.caBundle'Add RespectIgnoreDifferences=true.
Prevent โ Put it in resource.customizations.ignoreDifferences globally for webhook configurations, since every injected webhook behaves this way.
Q4 After installing Istio, every Deployment shows OutOfSync because of injected sidecar fields.
Intermediate
Likely causes โ Usually it is not the Deployment but Pods or objects you declared that Istio mutates (for example annotations Istio adds to Services or webhook configs), or label tracking colliding with Istio labels. Pod injection happens on Pods, which Argo CD does not diff against Git.
Diagnose โ argocd app diff to find the exact resource and field; check whether you declare objects Istio controls (for example istio-injection labels on namespaces managed by two places).
Fix โ Ignore the injected fields with jqPathExpressions or managedFieldsManagers: [pilot-discovery], or enable ServerSideDiff=true so webhook mutations are part of the expected state.
Prevent โ Server-side diff for meshes and policy engines that mutate on admission.
Q5 A ConfigMap is OutOfSync and the diff shows the same data in a different format (a number became a string).
Beginner
Likely causes โ YAML typing: data values in a ConfigMap must be strings; port: 8080 unquoted is coerced, or a Helm template outputs a number.
Diagnose โ argocd app diff web shows port: 8080 vs port: "8080"; helm template output confirms the unquoted value.
Fix โ Quote values ({{ .Values.port | quote }}) or write "8080" in plain YAML.
Prevent โ Lint rendered manifests with kubeconform in CI; it rejects non-string ConfigMap data.
Q6 A Deployment is OutOfSync on resources.limits.cpu: Git says 1000m, live says 1.
Intermediate
resources.limits.cpu: Git says 1000m, live says 1.Likely causes โ The API server normalizes quantities. Argo CD normalizes most cases, but some combinations (especially inside CRDs, which are not normalized by Argo CD's known-type logic) remain.
Diagnose โ argocd app diff shows the quantity formats; check whether the object is a built-in kind or a CRD.
Fix โ Write canonical values (cpu: "1", memory: 512Mi) or enable ServerSideDiff=true.
Prevent โ Standardize quantity formats in chart defaults.
Q7 An app is OutOfSync on a field that is not in Git at all, after an Argo CD upgrade.
Advanced
Likely causes โ Diff behaviour changed between versions (normalization, server-side diff defaults, tracking method change), or the last-applied-configuration annotation contains the field from an older manifest so three-way diff still considers it yours.
Diagnose โ
argocd app diff web
kubectl get <kind> <name> -o jsonpath='{.metadata.annotations.kubectl\.kubernetes\.io/last-applied-configuration}' | jq .Fix โ Sync once to refresh last-applied-configuration; if the field is defaulted, use server-side diff; if tracking changed, re-sync to add the new tracking annotation.
Prevent โ Upgrade a staging instance first and compare the count of OutOfSync apps before and after.
Q8 The app shows SharedResourceWarning: Namespace/payments is part of applications argocd/payments-api and payments-worker.
Beginner
SharedResourceWarning: Namespace/payments is part of applications argocd/payments-api and payments-worker.Likely causes โ Both apps render the same Namespace (or ConfigMap, ClusterRole).
Diagnose โ argocd app manifests payments-api | grep -A3 'kind: Namespace' and the same for the other app.
Fix โ Keep the resource in exactly one app (or use CreateNamespace=true and managedNamespaceMetadata in one app only) and remove it from the other.
Prevent โ FailOnSharedResource=true in sync options turns the warning into a failure.
Q9 A Secret generated by a Helm chart (genCA/randAlphaNum) shows OutOfSync after every refresh.
Intermediate
genCA/randAlphaNum) shows OutOfSync after every refresh.Likely causes โ Argo CD runs helm template on each render, so random or generated values change each time, and lookup (which charts use to reuse existing values) returns nothing.
Diagnose โ argocd app diff shows the Secret's data changing; the chart template contains randAlphaNum, genCA or lookup.
Fix โ Supply the value via existingSecret (Sealed Secrets or ESO), or set the value explicitly in values. Short-term: ignoreDifferences on /data for that Secret plus RespectIgnoreDifferences=true.
Prevent โ Prefer charts that support existingSecret; check for lookup before adopting a chart.
Q10 An app stays OutOfSync showing a resource marked "requires pruning", but auto-sync is on.
Beginner
Likely causes โ automated.prune is false, or the resource has Prune=false, or Prune=confirm waiting for approval.
Diagnose โ
argocd app get web -o yaml | yq '.spec.syncPolicy'
kubectl get <kind> <name> -o jsonpath='{.metadata.annotations.argocd\.argoproj\.io/sync-options}'Fix โ argocd app sync web --prune after reviewing, or enable prune: true, or confirm the prune in the UI.
Prevent โ Decide per app whether automated pruning is acceptable and document it.
Q11 After switching to annotation tracking, the UI shows every resource twice or many as "extraneous".
Advanced
Likely causes โ Resources still have the old app.kubernetes.io/instance label and do not yet have the argocd.argoproj.io/tracking-id annotation; or operator-created objects copied the label and now look orphaned or extraneous.
Diagnose โ kubectl get <kind> <name> -o yaml | grep -E 'instance|tracking-id'; argocd app get <app> for extraneous resources.
Fix โ Sync each app once so the tracking annotation is written. Consider annotation+label during the transition. Mark operator-generated objects with IgnoreExtraneous.
Prevent โ Plan the tracking change as a migration: staged, with syncs per app.
Q12 An ExternalSecret is always OutOfSync with fields like conversionStrategy: Default and decodingStrategy: None appearing in live.
Intermediate
ExternalSecret is always OutOfSync with fields like conversionStrategy: Default and decodingStrategy: None appearing in live.Likely causes โ ESO's CRD defaults these fields; your manifest omits them, and CRD defaults are not normalized by client-side diff.
Diagnose โ argocd app diff lists exactly those defaulted fields under remoteRef.
Fix โ Add the default values explicitly in Git, or enable ServerSideDiff=true for the app.
Prevent โ Use server-side diff for apps heavy in CRDs with schema defaults.
Q13 A CRD is OutOfSync on status or metadata.annotations fields that its controller sets.
Beginner
status or metadata.annotations fields that its controller sets.Likely causes โ You included status in the manifest (copied from kubectl get -o yaml), or the controller writes annotations you also declare.
Diagnose โ argocd app diff shows status: or controller annotations.
Fix โ Remove status and server-populated fields from Git (kubectl neat style cleanup); ignore controller-owned annotations via jq paths.
Prevent โ Never commit raw kubectl get -o yaml output; strip status, uid, resourceVersion, managedFields, creationTimestamp.
Q14 ignoreDifferences is configured for /spec/replicas, the diff is clean, but replicas still get reset on every sync.
Intermediate
ignoreDifferences is configured for /spec/replicas, the diff is clean, but replicas still get reset on every sync.Likely causes โ Missing RespectIgnoreDifferences=true; the sync still applies the whole manifest.
Diagnose โ argocd app get web -o yaml | yq '.spec.syncPolicy.syncOptions'.
Fix โ
syncPolicy:
syncOptions:
- RespectIgnoreDifferences=truePrevent โ Always pair field ignores with this option when another controller owns the field.
Q15 Your ignoreDifferences rule with a jq expression has no effect; the field is still shown in the diff.
Intermediate
ignoreDifferences rule with a jq expression has no effect; the field is still shown in the diff.Likely causes โ Wrong group or kind (core group must be ""), wrong name/namespace filter, or a jq expression that does not match (missing []?, wrong path).
Diagnose โ Test the expression on the live object:
kubectl get mutatingwebhookconfiguration my-hook -o json | jq '.webhooks[]?.clientConfig.caBundle'
argocd admin settings resource-overrides ignore-differences ./obj.yaml --argocd-cm-path ./argocd-cm.yamlFix โ Correct the selector fields and expression; refresh the app.
Prevent โ Keep a small test fixture per global ignore rule and test in CI.
Q16 An app is OutOfSync because the live object has an empty field that Git omits, for example securityContext: {} or env: [].
Beginner
securityContext: {} or env: [].Likely causes โ Usually the reverse: Git declares an empty value (env: [], annotations: {}) that the API server drops, so the diff sees a declared field missing in live.
Diagnose โ argocd app diff shows the empty structure; check the rendered manifest.
Fix โ Remove empty maps and lists from templates (Helm: {{- with .Values.env }} blocks).
Prevent โ Template patterns that omit empty blocks.
Q17 A Service of type LoadBalancer shows OutOfSync on spec.ports[0].nodePort and healthCheckNodePort.
Intermediate
LoadBalancer shows OutOfSync on spec.ports[0].nodePort and healthCheckNodePort.Likely causes โ You declared nodePort values that differ from what was allocated, or a previous manifest declared them (last-applied still lists them).
Diagnose โ Compare argocd app diff with kubectl get svc -o yaml.
Fix โ Remove nodePort from Git unless you need fixed ports; resync to refresh last-applied.
Prevent โ Let Kubernetes allocate node ports.
Q18 A self-heal loop makes the application controller CPU spike and other apps lag.
Advanced
Likely causes โ A tight fight between self-heal and another controller; each revert triggers a watch event and another sync.
Diagnose โ
argocd app list -o wide | grep OutOfSync
kubectl -n argocd logs sts/argocd-application-controller | grep -c 'Initiated automated sync'Check argocd_app_sync_total rate per app.
Fix โ Temporarily disable self-heal on the offending app, fix the field ownership, re-enable.
Prevent โ Alert on sync rate per app; newer versions back off self-heal retries, keep them on defaults rather than shortening them.
Q19 An app is OutOfSync because the Helm chart renders apiVersion: policy/v1beta1 for PodDisruptionBudget, and live shows policy/v1.
Intermediate
apiVersion: policy/v1beta1 for PodDisruptionBudget, and live shows policy/v1.Likely causes โ Old chart using a removed API, or .Capabilities.APIVersions not seeing policy/v1 so the chart picks the old one; on 1.25+ the old API no longer exists and apply fails.
Diagnose โ argocd app manifests web | grep -B2 PodDisruptionBudget; check the chart's capability conditions.
Fix โ Upgrade the chart; if needed set kubeVersion or apiVersions under spec.source.helm so the chart renders correctly.
Prevent โ Run pluto or kubeconform with the target Kubernetes version in CI.
Q20 An app shows OutOfSync with the message ComparisonError: ... unable to resolve 'main' to a commit SHA.
Beginner
OutOfSync with the message ComparisonError: ... unable to resolve 'main' to a commit SHA.Likely causes โ The branch or tag in targetRevision does not exist (renamed to master/main, typo, deleted tag).
Diagnose โ
git ls-remote https://github.com/org/cfg.git | grep -E 'refs/heads|refs/tags' | head
argocd app get web -o yaml | yq '.spec.source.targetRevision'Fix โ Correct targetRevision or recreate the tag.
Prevent โ Use HEAD for default-branch tracking, and protect release tags from deletion.
Manifest Generation & ComparisonError
๐ฅ Learn this hands-on with DevOps Shack โ YouTube @devopsshack ยท Hindi @shackverse ยท Courses at devopsshack.com
Q21 ComparisonError: Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = Manifest generation error (cached): ...
Intermediate
ComparisonError: Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = Manifest generation error (cached): ...Likely causes โ Rendering failed (Helm or Kustomize error) and the repo-server cached the failure; it returns the cached error until the cache expires or something changes.
Diagnose โ Read the rest of the message for the real error; reproduce locally with helm template or kustomize build at the same commit; check kubectl -n argocd logs deploy/argocd-repo-server.
Fix โ Fix the manifests and push, then argocd app get web --hard-refresh to bypass the cached error.
Prevent โ Render every app in CI on PRs to the config repo.
Q22 rpc error: code = Unknown desc = helm template . --name-template web --namespace web ... --include-crds failed exit status 1: Error: template: web/templates/deployment.yaml:24:20: executing "web/templates/deployment.yaml" at <.Values.image.tag>: nil pointer evaluating interface {}.tag
Beginner
rpc error: code = Unknown desc = helm template . --name-template web --namespace web ... --include-crds failed exit status 1: Error: template: web/templates/deployment.yaml:24:20: executing "web/templates/deployment.yaml" at <.Values.image.tag>: nil pointer evaluating interface {}.tagLikely causes โ A values key is missing: the value file for this environment does not define image, or the value file path is wrong so it was never loaded.
Diagnose โ
helm template web charts/web -f envs/prod/values.yaml --namespace web
argocd app get web -o yaml | yq '.spec.source.helm.valueFiles'Fix โ Add the missing values or default in the template ({{ .Values.image.tag | default .Chart.AppVersion }}), and fix the value file path.
Prevent โ helm lint with each environment's values in CI; add values.schema.json to the chart.
Q23 Error: open envs/prod/values.yaml: no such file or directory when the app renders.
Beginner
Error: open envs/prod/values.yaml: no such file or directory when the app renders.Likely causes โ valueFiles paths are relative to the chart path, not the repo root.
Diagnose โ Compare spec.source.path (for example charts/web) with the value file location.
Fix โ Use ../../envs/prod/values.yaml, or with multiple sources reference $values/envs/prod/values.yaml. Use ignoreMissingValueFiles: true only for optional files.
Prevent โ Render in CI with exactly the same relative paths Argo CD uses.
Q24 Error: values file '../../envs/prod/values.yaml' resolved to outside repository root
Intermediate
Error: values file '../../envs/prod/values.yaml' resolved to outside repository rootLikely causes โ The relative path climbs out of the repository (too many ../), or points at a file outside the repo; Argo CD blocks this for security.
Diagnose โ Count directories from the chart path to the repo root.
Fix โ Correct the relative path. If values live in another repo, use multiple sources with ref: values and $values/....
Prevent โ Keep a consistent depth for chart folders or use multi-source references.
Q25 Kustomize app fails: kustomize build ... failed exit status 1: Error: accumulating resources: accumulation err='accumulating resources from '../../base': ... must build at directory: not a valid directory'.
Beginner
kustomize build ... failed exit status 1: Error: accumulating resources: accumulation err='accumulating resources from '../../base': ... must build at directory: not a valid directory'.Likely causes โ Wrong relative path in resources, a folder renamed, or a remote base unreachable.
Diagnose โ kustomize build apps/web/overlays/prod locally at the same commit.
Fix โ Fix the path in kustomization.yaml. For remote bases, pin a ref and ensure the repo-server can reach and authenticate to it.
Prevent โ kustomize build every overlay in CI.
Q26 Error: trouble configuring builtin HelmChartInflationGenerator with config: ... must specify --enable-helm
Intermediate
Error: trouble configuring builtin HelmChartInflationGenerator with config: ... must specify --enable-helmLikely causes โ A kustomization.yaml uses helmCharts, but Argo CD runs Kustomize without --enable-helm.
Diagnose โ kubectl -n argocd get cm argocd-cm -o yaml | grep kustomize.buildOptions.
Fix โ
data:
kustomize.buildOptions: --enable-helmRestart is not required; refresh the app.
Prevent โ Keep argocd-cm in Git with build options documented.
Q27 rpc error: code = DeadlineExceeded desc = context deadline exceeded on several apps' comparison.
Advanced
rpc error: code = DeadlineExceeded desc = context deadline exceeded on several apps' comparison.Likely causes โ The repo-server is too slow: heavy Helm renders, large monorepo fetches, slow Git or Helm repo, saturated repo-server pods or OOM restarts.
Diagnose โ
kubectl -n argocd top pods
kubectl -n argocd logs deploy/argocd-repo-server --tail 200 | grep -iE 'timeout|took'
kubectl -n argocd get pods -l app.kubernetes.io/name=argocd-repo-serverFix โ Raise controller.repo.server.timeout.seconds and ARGOCD_EXEC_TIMEOUT, scale repo-server replicas and memory, set reposerver.parallelism.limit.
Prevent โ Webhooks plus manifest-generate-paths, vendored chart dependencies, and repo-server metrics alerts.
Q28 rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 10.96.12.4:8081: connect: connection refused"
Intermediate
rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 10.96.12.4:8081: connect: connection refused"Likely causes โ The controller or server cannot reach argocd-repo-server on 8081: repo-server pods crashed (OOM), are restarting, or a NetworkPolicy blocks it.
Diagnose โ
kubectl -n argocd get pods -l app.kubernetes.io/name=argocd-repo-server
kubectl -n argocd describe pod <repo-server-pod> | grep -A5 'Last State'
kubectl -n argocd get networkpolicyFix โ Fix the crash (memory limits, parallelism), restore network policy rules allowing controller and server to repo-server.
Prevent โ Multiple repo-server replicas with a PDB and memory alerts.
Q29 Helm dependency error: Error: no cached repository for helm-manager-... found. (try 'helm repo update') or Error: found in Chart.yaml, but missing in charts/ directory: postgresql.
Intermediate
Error: no cached repository for helm-manager-... found. (try 'helm repo update') or Error: found in Chart.yaml, but missing in charts/ directory: postgresql.Likely causes โ An umbrella chart's dependency repository is not registered or reachable from Argo CD, or credentials for a private dependency repo are missing.
Diagnose โ Check Chart.yaml dependencies and argocd repo list; try helm dependency build locally.
Fix โ Register the dependency repository in Argo CD (argocd repo add <url> --type helm --name <name>), add credentials, or vendor the dependency tarballs into charts/ with Chart.lock.
Prevent โ Vendor dependencies for production charts so renders do not depend on external repos.
Q30 failed to fetch chart: failed to download chart: unexpected status code 401 for an OCI Helm chart.
Intermediate
failed to fetch chart: failed to download chart: unexpected status code 401 for an OCI Helm chart.Likely causes โ Missing or wrong registry credentials; for ECR, an expired token (12 hours); OCI not enabled on the repo Secret.
Diagnose โ argocd repo list; check the repo Secret for type: helm and enableOCI: "true"; helm pull oci://<registry>/<chart> --version <v> with the same creds.
Fix โ Update credentials; for ECR, refresh with a CronJob or an ESO ECRAuthorizationToken generator writing the repo Secret.
Prevent โ Use short-lived credential automation for cloud registries.
Q31 The repo-server logs Error: unknown command "kustomize" for "argocd" or a plugin app shows couldn't find cmp-server plugin.
Advanced
Error: unknown command "kustomize" for "argocd" or a plugin app shows couldn't find cmp-server plugin.Likely causes โ The Application references a plugin that is not installed as a sidecar, the sidecar is crash-looping, or the plugin name (including version suffix) does not match.
Diagnose โ
kubectl -n argocd get pod -l app.kubernetes.io/name=argocd-repo-server -o jsonpath='{.items[0].spec.containers[*].name}'
kubectl -n argocd logs deploy/argocd-repo-server -c <plugin-sidecar>Fix โ Install or fix the CMP sidecar with its plugin.yaml; reference it as plugin.name: <name>-<version> when a version is set, or let discovery match it.
Prevent โ Version and test plugin sidecars as part of the Argo CD deployment.
Q32 App fails with Unable to generate manifests in apps/web: rpc error: code = Unknown desc = apps/web: app path does not exist.
Beginner
Unable to generate manifests in apps/web: rpc error: code = Unknown desc = apps/web: app path does not exist.Likely causes โ Wrong path, a folder renamed in Git, or targetRevision points at a branch where the path does not exist yet.
Diagnose โ git ls-tree -d <revision> apps/ in the config repo; argocd app get web -o yaml | yq '.spec.source'.
Fix โ Correct the path or revision.
Prevent โ Generate Applications with a git directory generator so paths always exist.
Q33 Kustomize build failed: ... json: unknown field "patchesStrategicMerge" warnings, or a deprecated-field error after an Argo CD upgrade.
Intermediate
Kustomize build failed: ... json: unknown field "patchesStrategicMerge" warnings, or a deprecated-field error after an Argo CD upgrade.Likely causes โ The Kustomize version bundled with the new Argo CD deprecates or changes fields (patchesStrategicMerge, commonLabels, bases).
Diagnose โ kubectl -n argocd exec deploy/argocd-repo-server -- kustomize version; run the same version locally.
Fix โ Run kustomize edit fix to migrate files; or pin an older Kustomize version via kustomize.path.<version> in argocd-cm and spec.source.kustomize.version temporarily.
Prevent โ Track the bundled tool versions in Argo CD release notes.
Q34 A Jsonnet or directory app renders nothing and the app is Synced with zero resources, though files exist.
Intermediate
Likely causes โ Files are in subfolders and directory.recurse is false, or include/exclude globs filter them out, or the files have extensions Argo CD ignores.
Diagnose โ argocd app manifests web returns empty; check spec.source.directory.
Fix โ Set directory: {recurse: true} or fix globs; use .yaml, .yml, .json or .jsonnet extensions.
Prevent โ Keep allowEmpty: false on automated sync so an empty render cannot prune everything.
Q35 ComparisonError: ... error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type map[string]interface {}
Intermediate
ComparisonError: ... error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type map[string]interface {}Likely causes โ A rendered file contains something that is not a Kubernetes object: a stray YAML document with only a string, a values file inside the manifests path, a README in YAML, or broken indentation.
Diagnose โ argocd app manifests web --source git or local render; look for documents without apiVersion/kind.
Fix โ Remove non-manifest YAML from the path, or exclude it with directory.exclude, or fix the template output.
Prevent โ kubeconform in CI rejects non-object documents.
Q36 App rendering succeeds locally but fails in Argo CD with Error: chart requires kubeVersion: >=1.29.0-0 which is incompatible with Kubernetes v1.20.0.
Advanced
Error: chart requires kubeVersion: >=1.29.0-0 which is incompatible with Kubernetes v1.20.0.Likely causes โ Helm's default kubeVersion is used, because Argo CD does not have the destination cluster's version (cluster info not yet loaded, cluster unreachable), or an explicit wrong kubeVersion override.
Diagnose โ argocd cluster get <cluster> for server version and connection status.
Fix โ Fix cluster connectivity so cluster info is populated; or set spec.source.helm.kubeVersion explicitly.
Prevent โ Monitor cluster connection status; avoid hardcoding kubeVersion.
Q37 Unable to create application: application spec for web is invalid: InvalidSpecError: Unable to generate manifests in apps/web: rpc error: code = Unknown desc = ... repository not accessible
Beginner
Unable to create application: application spec for web is invalid: InvalidSpecError: Unable to generate manifests in apps/web: rpc error: code = Unknown desc = ... repository not accessibleLikely causes โ Argo CD validates the source at create time and cannot access the repo (credentials, URL typo, network).
Diagnose โ argocd repo list to see if the repo is registered and its connection status; argocd repo get <url>.
Fix โ Register the repo with correct credentials or fix the URL; or create with --validate=false and fix later (not recommended).
Prevent โ Credential templates for the org and consistent URL forms.
Q38 Multi-source app error: $values is not substituted, Helm says open $values/envs/prod/values.yaml: no such file or directory.
Intermediate
$values is not substituted, Helm says open $values/envs/prod/values.yaml: no such file or directory.Likely causes โ No source has ref: values, the ref name differs (ref: config but $values used), or the app uses source (singular) instead of sources.
Diagnose โ argocd app get web -o yaml | yq '.spec.sources'.
Fix โ Add ref: values to the Git source, match the name in the path, and use sources: list form.
Prevent โ Template multi-source apps from a known-good example.
Repos, Clusters, Projects & Permissions
๐ฅ Learn this hands-on with DevOps Shack โ YouTube @devopsshack ยท Hindi @shackverse ยท Courses at devopsshack.com
Q39 Adding a private GitHub repo over HTTPS fails with rpc error: code = Unknown desc = authentication required.
Beginner
rpc error: code = Unknown desc = authentication required.Likely causes โ No credentials stored for that URL, an expired or revoked personal access token, a token without repo/contents:read scope, or the repo secret is missing the argocd.argoproj.io/secret-type: repository label.
Diagnose โ
argocd repo list
kubectl -n argocd get secrets -l argocd.argoproj.io/secret-type=repository
git ls-remote https://<user>:<token>@github.com/org/config.git # test the token outside Argo CDFix โ Re-add the repo with a valid token: argocd repo add https://github.com/org/config.git --username git --password <token> --upsert.
Prevent โ Use a GitHub App credential template instead of personal tokens, and alert on repo connection failures.
Q40 An SSH repo fails with ssh: handshake failed: knownhosts: key is unknown.
Beginner
ssh: handshake failed: knownhosts: key is unknown.Likely causes โ The Git host's SSH key is not in argocd-ssh-known-hosts-cm. Common with self-hosted GitLab/Bitbucket, or after the host rotated its key.
Diagnose โ argocd cert list --cert-type ssh and compare with ssh-keyscan git.example.com.
Fix โ
ssh-keyscan git.example.com | argocd cert add-ssh --batchOr add the lines to argocd-ssh-known-hosts-cm declaratively. Do not set insecure: true in production.
Prevent โ Manage known hosts in Git with the rest of the Argo CD config and update them when the host rotates keys.
Q41 SSH repo: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain.
Beginner
ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain.Likely causes โ Wrong private key, the public half was never added as a deploy key, the key has a passphrase (Argo CD cannot use it), or the URL uses a user other than git.
Diagnose โ ssh -i key -T [email protected] from a workstation; check the secret's sshPrivateKey field starts with -----BEGIN OPENSSH PRIVATE KEY----- and has a trailing newline.
Fix โ Generate a passphrase-less deploy key (ssh-keygen -t ed25519 -N ""), add the public key read-only on the repo, and register: argocd repo add [email protected]:org/config.git --ssh-private-key-path ./key --upsert.
Prevent โ One deploy key per repo, rotated on a schedule, stored through External Secrets.
Q42 A self-hosted GitLab repo fails with x509: certificate signed by unknown authority.
Intermediate
x509: certificate signed by unknown authority.Likely causes โ GitLab uses a certificate from an internal CA that the repo-server does not trust.
Diagnose โ openssl s_client -connect gitlab.internal:443 -showcerts to see the chain; argocd cert list --cert-type https.
Fix โ
argocd cert add-tls gitlab.internal --from ./internal-ca.pemThis writes to argocd-tls-certs-cm, which is mounted into repo-server. For Helm OCI registries on the same CA, the same entry applies by hostname.
Prevent โ Keep the internal CA bundle in the Argo CD install values; never use --insecure-skip-server-verification as a permanent fix.
Q43 A credential template exists for https://github.com/org, yet new repos under the org still fail with authentication required.
Intermediate
https://github.com/org, yet new repos under the org still fail with authentication required.Likely causes โ URL mismatch: the template is https://github.com/org but apps use [email protected]:org/... (SSH), or a different host alias like https://www.github.com. Templates match by URL prefix, so protocol and host must match exactly. A labelled repo-creds secret is also required (secret-type: repo-creds).
Diagnose โ argocd repocreds list; compare its URL with the exact repoURL in the Application.
Fix โ Standardise all repoURLs on one form, or add a template for the other form.
Prevent โ Validate repoURL format in CI with a simple lint rule.
Q44 Sync fails with application repo https://github.com/org/payments-config.git is not permitted in project 'team-a'.
Beginner
application repo https://github.com/org/payments-config.git is not permitted in project 'team-a'.Likely causes โ The AppProject's sourceRepos does not include the repo, often because of a missing .git suffix or a different URL form.
Diagnose โ argocd proj get team-a and look at Source Repositories.
Fix โ argocd proj add-source team-a https://github.com/org/payments-config.git, or use a glob in Git: sourceRepos: ["https://github.com/org/payments-*"].
Prevent โ Manage AppProjects in Git, reviewed by the platform team, with globs scoped per team.
Q45 application destination server 'https://kubernetes.default.svc' and namespace 'payments' do not match any of the allowed destinations in project 'team-a'.
Beginner
application destination server 'https://kubernetes.default.svc' and namespace 'payments' do not match any of the allowed destinations in project 'team-a'.Likely causes โ The project's destinations list does not include that server/namespace pair, or the app uses destination.name while the project lists only server (or the reverse in older versions).
Diagnose โ argocd proj get team-a -o yaml | yq '.spec.destinations'.
Fix โ
spec:
destinations:
- server: https://kubernetes.default.svc
namespace: paymentsUse namespace: 'payments-*' for a team prefix.
Prevent โ Give each team a namespace prefix and a matching destination glob.
Q46 Sync fails with resource :Namespace is not permitted in project team-a.
Intermediate
resource :Namespace is not permitted in project team-a.Likely causes โ Namespace is a cluster-scoped kind, and the project's clusterResourceWhitelist is empty (the default for a new project). The same happens for ClusterRole, CRD and other cluster-scoped kinds.
Diagnose โ argocd proj get team-a -o yaml | yq '.spec.clusterResourceWhitelist'.
Fix โ Either let the platform team create the namespace and use CreateNamespace=true only where allowed, or whitelist the specific kind:
clusterResourceWhitelist:
- group: ""
kind: NamespacePrevent โ Keep cluster-scoped resources in a platform-owned project; tenants get namespaced kinds only.
Q47 A namespaced resource is blocked: resource networking.k8s.io:NetworkPolicy is not permitted in project team-a.
Intermediate
resource networking.k8s.io:NetworkPolicy is not permitted in project team-a.Likely causes โ The project has a namespaceResourceBlacklist entry for that kind, or a namespaceResourceWhitelist that omits it. Platforms often block NetworkPolicy, ResourceQuota and LimitRange so tenants cannot loosen guardrails.
Diagnose โ argocd proj get team-a -o yaml | yq '.spec.namespaceResource*'.
Fix โ If the block is intended, move the object to the platform repo. If not, remove it from the blacklist through a reviewed PR.
Prevent โ Document which kinds tenants own; return a clear error in a CI policy check before merge.
Q48 InvalidSpecError: application references project team-a which does not exist.
Beginner
InvalidSpecError: application references project team-a which does not exist.Likely causes โ The AppProject was not created yet (ordering in the bootstrap), it lives in a different namespace than the Argo CD control plane namespace, or a typo.
Diagnose โ kubectl -n argocd get appprojects.
Fix โ Create the project first. In app-of-apps bootstraps, put AppProjects in an earlier sync wave (argocd.argoproj.io/sync-wave: "-1") than the Applications.
Prevent โ Bootstrap order: projects, then platform apps, then tenant apps.
Q49 With "apps in any namespace" enabled, an Application in team-a namespace shows app is not allowed in project 'team-a', or the project does not exist.
Advanced
team-a namespace shows app is not allowed in project 'team-a', or the project does not exist.Likely causes โ The AppProject does not list the namespace in spec.sourceNamespaces, or the controller and server were not started with --application-namespaces covering it.
Diagnose โ
kubectl -n argocd get cm argocd-cmd-params-cm -o yaml | grep application.namespaces
kubectl -n argocd get appproject team-a -o yaml | yq '.spec.sourceNamespaces'Fix โ Set application.namespaces: team-* in argocd-cmd-params-cm, restart server and controller, and add sourceNamespaces: ["team-a"] to the project.
Prevent โ Treat both settings as one change in the platform repo; never use "*" in sourceNamespaces for tenant projects.
Q50 A user clicks Sync and gets rpc error: code = PermissionDenied desc = permission denied: applications, sync, team-a/web, sub: [email protected].
Intermediate
rpc error: code = PermissionDenied desc = permission denied: applications, sync, team-a/web, sub: [email protected].Likely causes โ No RBAC policy grants sync on that project, the user's SSO group name does not match the group in policy.csv, or scopes in argocd-rbac-cm does not include the claim that carries groups.
Diagnose โ
argocd account get-user-info # shows the groups Argo CD sees
argocd admin settings rbac can [email protected] sync applications 'team-a/web' \
--policy-file policy.csvFix โ Add p, role:team-a-dev, applications, sync, team-a/*, allow and g, <exact-group-name>, role:team-a-dev. Set scopes: '[groups, email]' if groups are missing.
Prevent โ Test RBAC changes in CI with argocd admin settings rbac validate.
Q51 SSO login works but every user sees no applications.
Intermediate
Likely causes โ policy.default is empty and the groups claim is not reaching Argo CD: the IdP does not send groups in the ID token, Azure AD sends group object IDs instead of names, or Okta's groups claim filter excludes the groups.
Diagnose โ argocd account get-user-info after login; decode the ID token at the CLI (argocd account get-user-info shows Groups:); check Dex logs: kubectl -n argocd logs deploy/argocd-dex-server.
Fix โ Configure the IdP to emit groups (Azure: groupMembershipClaims, map by object ID in policy.csv); set policy.default: role:readonly if read access for all is acceptable.
Prevent โ Keep one break-glass local admin, disabled by default, and document the claim mapping.
Q52 SSO login fails with failed to get token: oauth2: cannot fetch token: 401 Unauthorized or invalid_client.
Intermediate
failed to get token: oauth2: cannot fetch token: 401 Unauthorized or invalid_client.Likely causes โ Wrong or rotated client secret, the secret referenced as $oidc.azure.clientSecret does not exist in argocd-secret, or the redirect URI registered at the IdP differs from https://argocd.example.com/auth/callback (or /api/dex/callback for Dex).
Diagnose โ kubectl -n argocd logs deploy/argocd-server | grep -i oidc; confirm url: in argocd-cm is the public URL users hit.
Fix โ Update the client secret in argocd-secret (or the external secret it references), fix url and the registered redirect URI, then restart argocd-server.
Prevent โ Calendar the IdP secret expiry (Azure secrets expire), and sync the secret through External Secrets.
Q53 argocd app list from a laptop fails with transport: received the unexpected content-type "text/plain; charset=utf-8".
Beginner
argocd app list from a laptop fails with transport: received the unexpected content-type "text/plain; charset=utf-8".Likely causes โ The CLI speaks gRPC, but an ingress or load balancer in front of argocd-server only proxies HTTP/1.1 and returns an HTML or text error page.
Diagnose โ Retry with --grpc-web; if that works, the proxy is the problem.
Fix โ Use argocd login argocd.example.com --grpc-web, or configure the ingress for gRPC (separate gRPC host with backend-protocol: GRPC on ingress-nginx, or an ALB with a gRPC target group).
Prevent โ Document the login command with --grpc-web for users behind corporate proxies.
Q54 The UI behind ingress-nginx loops with ERR_TOO_MANY_REDIRECTS.
Beginner
ERR_TOO_MANY_REDIRECTS.Likely causes โ TLS terminates at the ingress, which talks HTTP to argocd-server, and argocd-server redirects HTTP to HTTPS, forever.
Diagnose โ curl -I http://argocd-server.argocd.svc from a pod returns a 307 to https.
Fix โ Either run the server in insecure mode behind TLS termination:
# argocd-cmd-params-cm
data:
server.insecure: "true"or use SSL passthrough (nginx.ingress.kubernetes.io/ssl-passthrough: "true" plus --enable-ssl-passthrough on the controller). Restart argocd-server after the change.
Prevent โ Pick one TLS model in the install values and keep it in Git.
Q55 A CI job's argocd app sync fails with account 'ci-bot' does not have apiKey capability.
Beginner
argocd app sync fails with account 'ci-bot' does not have apiKey capability.Likely causes โ The local account was created with only login capability, or not created at all.
Diagnose โ argocd account list shows capabilities per account.
Fix โ
# argocd-cm
data:
accounts.ci-bot: apiKeyThen argocd account generate-token --account ci-bot --expires-in 720h and add a scoped RBAC policy for ci-bot.
Prevent โ Prefer project-scoped tokens (argocd proj role create-token) for CI, with an expiry, rotated automatically.
Q56 A cluster shows ConnectionStatus: Failed with the server has asked for the client to provide credentials.
Intermediate
ConnectionStatus: Failed with the server has asked for the client to provide credentials.Likely causes โ The bearer token in the cluster secret expired or the ServiceAccount token secret was deleted; on EKS, the IAM role used by Argo CD lost its access entry or aws-auth mapping.
Diagnose โ
argocd cluster get https://<api-endpoint>
kubectl -n argocd get secret -l argocd.argoproj.io/secret-type=clusterFor EKS: aws eks list-access-entries --cluster-name prod.
Fix โ Re-run argocd cluster add <context> --upsert to mint a new token, or restore the EKS access entry for the Argo CD role (IRSA/Pod Identity with awsAuthConfig in the cluster secret).
Prevent โ Use IAM-based auth (execProviderConfig or awsAuthConfig) instead of long-lived tokens; alert on argocd_cluster_connection_status.
Q57 Destination fails with unable to find destination server: there are no clusters with this name: prod-eu.
Beginner
unable to find destination server: there are no clusters with this name: prod-eu.Likely causes โ The cluster secret's name field differs (prod-eu-1), the secret is missing the argocd.argoproj.io/secret-type: cluster label, or the cluster was registered under a server URL only.
Diagnose โ argocd cluster list shows names and servers.
Fix โ Rename the cluster in its secret (stringData.name: prod-eu) or update the Application's destination.name.
Prevent โ Generate cluster secrets from a single source (Terraform or a cluster ApplicationSet) with a naming convention.
Q58 A cluster added with namespace scope shows failed to sync cluster: ... deployments.apps is forbidden: User "system:serviceaccount:kube-system:argocd-manager" cannot list resource "deployments" in API group "apps" at the cluster scope.
Advanced
failed to sync cluster: ... deployments.apps is forbidden: User "system:serviceaccount:kube-system:argocd-manager" cannot list resource "deployments" in API group "apps" at the cluster scope.Likely causes โ The ServiceAccount only has Roles in specific namespaces, but the cluster secret has no namespaces field, so the controller tries to watch cluster-wide.
Diagnose โ kubectl auth can-i list deployments -A --as system:serviceaccount:kube-system:argocd-manager on the target cluster.
Fix โ
argocd cluster add team-ctx --namespace payments --namespace payments-jobs --upsertThis sets namespaces: payments,payments-jobs in the secret. Add clusterResources: "true" only if cluster-scoped kinds are needed and granted.
Prevent โ Pair namespace-scoped RBAC with the matching namespaces list, both generated from the same tenant definition.
Q59 Repo connection works from a laptop, but in the cluster: dial tcp 140.82.112.4:443: i/o timeout.
Intermediate
dial tcp 140.82.112.4:443: i/o timeout.Likely causes โ Egress is blocked: a NetworkPolicy on the argocd namespace, a firewall that only allows traffic via a corporate proxy, or a private cluster without NAT.
Diagnose โ
kubectl -n argocd exec deploy/argocd-repo-server -- git ls-remote https://github.com/org/config.git
kubectl -n argocd get networkpolicyFix โ Allow egress on 443/22 to the Git host, or set proxy: on the repository secret (or HTTPS_PROXY/NO_PROXY env on repo-server, with NO_PROXY including the cluster service CIDR and .svc).
Prevent โ Include Argo CD egress requirements in the platform network design doc.
Q60 Argo CD stops refreshing many apps, and repo-server logs show remote: Repository not found or 429 Too Many Requests from GitHub during busy hours.
Advanced
remote: Repository not found or 429 Too Many Requests from GitHub during busy hours.Likely causes โ Hundreds of apps poll the same repos every 3 minutes with one token, hitting GitHub rate limits; GitHub returns misleading "not found" when a token is throttled or lacks access.
Diagnose โ Count git ls-remote calls in repo-server logs; check the rate limit for the token: curl -H "Authorization: Bearer $TOKEN" https://api.github.com/rate_limit.
Fix โ Configure webhooks and raise timeout.reconciliation (for example 600s) in argocd-cm; switch to a GitHub App credential (higher limits); consolidate apps on fewer repos.
Prevent โ Webhook-driven refresh plus jittered polling (timeout.reconciliation.jitter) as the fallback.
Sync Operations, Hooks & Health
๐ฅ Learn this hands-on with DevOps Shack โ YouTube @devopsshack ยท Hindi @shackverse ยท Courses at devopsshack.com
Q61 Sync fails with one or more synchronization tasks are not valid and the server could not find the requested resource for a custom resource.
Intermediate
one or more synchronization tasks are not valid and the server could not find the requested resource for a custom resource.Likely causes โ The CRD and its CRs are in the same sync, and the dry-run runs before the CRD exists, so the API server does not know the kind.
Diagnose โ argocd app get web lists the failing CR kind; kubectl get crd | grep <group> on the target.
Fix โ Add argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true to the CRs, or put the CRD in an earlier sync wave, or install CRDs from a separate app.
Prevent โ Operators and their CRDs belong to a platform app that syncs before tenant apps.
Q62 one or more objects failed to apply, reason: Deployment.apps "web" is invalid: spec.selector: Invalid value: ...: field is immutable.
Beginner
one or more objects failed to apply, reason: Deployment.apps "web" is invalid: spec.selector: Invalid value: ...: field is immutable.Likely causes โ Someone changed labels used in spec.selector (often via a chart upgrade or a new commonLabels in Kustomize). Selectors and some fields (Job spec.template, Service clusterIP) cannot be updated in place.
Diagnose โ argocd app diff web shows the selector change.
Fix โ Revert the selector change, or let Argo CD recreate just that resource: annotate it with argocd.argoproj.io/sync-options: Replace=true (or Force=true,Replace=true) for one sync. Expect a brief outage for that Deployment.
Prevent โ Use labels with includeSelectors: false in Kustomize instead of commonLabels; review chart upgrades for selector changes.
Q63 Sync of a large CRD fails with metadata.annotations: Too long: must have at most 262144 bytes.
Beginner
metadata.annotations: Too long: must have at most 262144 bytes.Likely causes โ Client-side apply stores the full object in the kubectl.kubernetes.io/last-applied-configuration annotation, which exceeds 256 KiB for big CRDs (Prometheus Operator, Crossplane, Argo's own).
Diagnose โ The failing resource is almost always a CRD or a large ConfigMap.
Fix โ Enable server-side apply for the app or that resource:
syncPolicy:
syncOptions:
- ServerSideApply=trueReplace=true also works but recreates the object.
Prevent โ Default to ServerSideApply=true for apps that ship CRDs.
Q64 An app has been stuck at Syncing for an hour with waiting for completion of hook batch/Job/db-migrate.
Intermediate
Syncing for an hour with waiting for completion of hook batch/Job/db-migrate.Likely causes โ The hook Job never finishes: its pod is Pending (no capacity, missing secret, image pull error), or the migration hangs on a DB lock. Argo CD waits for hooks indefinitely unless the Job has a deadline.
Diagnose โ
kubectl -n web get job db-migrate
kubectl -n web describe pod -l job-name=db-migrate
kubectl -n web logs job/db-migrateFix โ Fix the pod problem, or end the operation: argocd app terminate-op web, then delete the Job and sync again.
Prevent โ Set activeDeadlineSeconds and backoffLimit on every hook Job; alert on operations running longer than 15 minutes.
Q65 A PreSync hook fails with jobs.batch "db-migrate" already exists.
Beginner
jobs.batch "db-migrate" already exists.Likely causes โ The previous run's Job was not deleted, because the hook has no hook-delete-policy or uses HookSucceeded and the last run failed.
Diagnose โ kubectl -n web get job db-migrate -o yaml | yq '.metadata.annotations'.
Fix โ Delete the old Job and set:
annotations:
argocd.argoproj.io/hook: PreSync
argocd.argoproj.io/hook-delete-policy: BeforeHookCreationOr use generateName so every run gets a new Job.
Prevent โ BeforeHookCreation as the default policy for all hook Jobs; it keeps the last failed Job for debugging.
Q66 A PostSync smoke-test hook never runs, even though the sync says succeeded.
Intermediate
Likely causes โ PostSync hooks run only after all resources are Healthy. If something stays Progressing (an Ingress without an address, a PVC waiting for a consumer, a Rollout paused), the hook waits. Also, a hook placed in a file that the source excludes never renders.
Diagnose โ argocd app get web and look for resources not Healthy; confirm the hook is in argocd app manifests web.
Fix โ Fix the stuck resource or its health check (see Q167), then re-sync.
Prevent โ Keep a short list of kinds with known slow health and add custom health checks for them.
Q67 An Ingress stays Progressing forever, holding the app at Progressing.
Intermediate
Progressing forever, holding the app at Progressing.Likely causes โ Argo CD treats an Ingress as Healthy only when status.loadBalancer.ingress is set. Some controllers (or internal setups) never populate it.
Diagnose โ kubectl -n web get ingress web -o yaml | yq '.status'.
Fix โ Configure the controller to publish status (--publish-service on ingress-nginx), or override the health check:
# argocd-cm
data:
resource.customizations.health.networking.k8s.io_Ingress: |
hs = {}
hs.status = "Healthy"
hs.message = "status not reported by this controller"
return hsPrevent โ Verify health behaviour for each controller you adopt before onboarding apps.
Q68 App health is Degraded with Deployment "web" exceeded its progress deadline.
Beginner
Degraded with Deployment "web" exceeded its progress deadline.Likely causes โ New pods never became Ready within progressDeadlineSeconds (default 600): bad image tag, CrashLoopBackOff, failing readiness probe, or insufficient capacity.
Diagnose โ
kubectl -n web rollout status deploy/web
kubectl -n web get pods
kubectl -n web describe pod <new-pod>Fix โ Fix the root cause in Git and let Argo CD sync. To restore service fast, revert the commit (git revert); argocd app rollback only works with auto-sync off.
Prevent โ Readiness probes that reflect real health, and notifications on on-health-degraded.
Q69 argocd app rollback web 12 fails with rollback cannot be initiated when auto-sync is enabled.
Beginner
argocd app rollback web 12 fails with rollback cannot be initiated when auto-sync is enabled.Likely causes โ By design: with auto-sync on, Git is the only source of truth, so a rollback would be undone immediately.
Diagnose โ argocd app get web -o yaml | yq '.spec.syncPolicy.automated'.
Fix โ The GitOps way: git revert <bad-commit> and push. For an emergency, disable auto-sync (argocd app set web --sync-policy none), roll back, then fix Git and re-enable.
Prevent โ Teach on-call that rollback means revert in Git; keep the emergency path in the runbook with a reminder to re-enable auto-sync.
Q70 Manual sync is refused with a message that the app is blocked by a sync window.
Beginner
Likely causes โ A deny window is active in the AppProject (for example a weekend freeze), or an allow window exists and the current time is outside it.
Diagnose โ argocd proj windows list team-a shows active windows and whether manualSync is allowed.
Fix โ If the change is an approved hotfix and the window has manualSync: true, sync manually. Otherwise ask the project owner to adjust the window through Git.
Prevent โ Use manualSync: true on freeze windows so humans can still ship approved fixes; set timeZone explicitly to avoid UTC surprises.
Q71 Deleting an Application hangs with the app stuck in Deleting.
Intermediate
Deleting.Likely causes โ The resources-finalizer.argocd.argoproj.io finalizer waits for all child resources to be deleted, and one cannot be: the destination cluster is gone, a child has its own stuck finalizer (a PVC, a namespace with a stuck CR), or RBAC denies delete.
Diagnose โ
argocd app resources web --orphaned=false
kubectl -n web get all,pvc -o name
kubectl get ns web -o yaml | yq '.status.conditions'Fix โ Fix the stuck child. If the cluster no longer exists, remove the finalizer:
kubectl -n argocd patch app web --type json -p '[{"op":"remove","path":"/metadata/finalizers"}]'Prevent โ Delete Applications before decommissioning clusters.
Q72 Sync fails with namespaces "payments" not found.
Beginner
namespaces "payments" not found.Likely causes โ The destination namespace does not exist and the app does not create it.
Diagnose โ kubectl get ns payments on the target cluster.
Fix โ Add the sync option, plus labels if needed:
syncPolicy:
syncOptions:
- CreateNamespace=true
managedNamespaceMetadata:
labels:
team: paymentsOr create the namespace in a platform app first.
Prevent โ Decide per tenancy model who owns namespaces and make it the default in the app template.
Q73 Sync shows Retrying attempt #5 and the operation finally fails with admission webhook "validation.gatekeeper.sh" denied the request.
Intermediate
Retrying attempt #5 and the operation finally fails with admission webhook "validation.gatekeeper.sh" denied the request.Likely causes โ A policy engine (Gatekeeper, Kyverno) rejects the object, for example missing resource limits or a disallowed registry. Retries cannot help.
Diagnose โ argocd app get web shows the full denial message; kubectl get constraints or kubectl get clusterpolicy on the cluster.
Fix โ Fix the manifest in Git to meet the policy. Do not add policy exceptions to unblock one deploy without review.
Prevent โ Run the same policies in CI (gator test, kyverno apply) against rendered manifests before merge.
Q74 A sync succeeds but some resources are applied before their dependencies despite sync waves.
Advanced
Likely causes โ Waves only order resources inside one Application. The dependency lives in another app; or the wave annotation is on a Helm value that never renders; or the wave value is not a quoted string.
Diagnose โ argocd app manifests web | grep -B2 -A2 sync-wave; check which app owns each resource.
Fix โ Move dependent resources into the same app, or order Applications themselves with waves in the parent app-of-apps. Note that Application health must be enabled for waves between apps to wait on child health: add the argoproj.io/Application health customization in argocd-cm.
Prevent โ Keep tightly coupled resources in one app and quote wave values ("-1").
ApplicationSets, Rollouts & Image Updater
๐ฅ Learn this hands-on with DevOps Shack โ YouTube @devopsshack ยท Hindi @shackverse ยท Courses at devopsshack.com
Q75 The ApplicationSet status shows ApplicationSet argocd/team-apps contains applications with duplicate name: web.
Beginner
ApplicationSet argocd/team-apps contains applications with duplicate name: web.Likely causes โ Two generator results produce the same metadata.name, for example a git directory generator finding apps/web in two envs while the name template uses only {{.path.basename}}.
Diagnose โ kubectl -n argocd get applicationset team-apps -o yaml | yq '.status.conditions'.
Fix โ Make the name unique per element: name: '{{.path.basename}}-{{index .path.segments 1}}' or include the cluster name.
Prevent โ Name template convention <app>-<env>-<cluster> for every ApplicationSet.
Q76 ApplicationGenerationFromParamsError: failed to execute go template ...: map has no entry for key "cluster".
Intermediate
ApplicationGenerationFromParamsError: failed to execute go template ...: map has no entry for key "cluster".Likely causes โ With goTemplate: true and goTemplateOptions: ["missingkey=error"], the template references a key the generator does not produce. Cluster generator keys are name, server, metadata.labels.<key>; the git directory generator produces path.*.
Diagnose โ Print the generator output by temporarily templating a ConfigMap, or check the generator's documented parameters.
Fix โ Use the right key ({{.name}} not {{.cluster}}); with a matrix generator, check that the child generator providing the key is actually there.
Prevent โ Keep missingkey=error; it catches typos instead of creating apps named <no value>.
Q77 A git outage made the git generator return nothing, and the ApplicationSet deleted all its Applications and their workloads.
Advanced
Likely causes โ The default policy is sync, which deletes Applications that disappear from generator output; the Applications have the resources finalizer, so workloads were pruned too.
Diagnose โ ApplicationSet controller logs around the outage: kubectl -n argocd logs deploy/argocd-applicationset-controller.
Fix โ Restore Git access and let the set re-create apps. Then harden:
spec:
syncPolicy:
applicationsSync: create-update # never delete
preserveResourcesOnDeletion: true # keep workloads if an app is deletedPrevent โ Use create-update (or --policy on the controller) for production sets and require manual cleanup.
Q78 Manual edits to an Application owned by an ApplicationSet (for example a changed targetRevision) keep getting reverted.
Beginner
targetRevision) keep getting reverted.Likely causes โ The ApplicationSet controller owns the full spec and regenerates it on every reconcile.
Diagnose โ kubectl -n argocd get app web -o yaml | yq '.metadata.ownerReferences'.
Fix โ Change the value in the ApplicationSet template or generator data. If a field must be editable per app, list it in ignoreApplicationDifferences:
spec:
ignoreApplicationDifferences:
- jsonPointers:
- /spec/source/targetRevisionPrevent โ Tell teams that generated apps are read-only and changes go through the set.
Q79 A newly registered cluster gets no Applications from a cluster-generator ApplicationSet.
Intermediate
Likely causes โ The generator's selector.matchLabels requires labels the cluster secret does not have. The local in-cluster has no secret, so label selectors never match it unless you create one.
Diagnose โ
kubectl -n argocd get secret -l argocd.argoproj.io/secret-type=cluster --show-labelsFix โ Label the cluster secret (kubectl label secret <cluster-secret> env=prod -n argocd) or set labels at registration with argocd cluster add ctx --label env=prod.
Prevent โ Make labels part of the cluster registration code (Terraform), not a manual step.
Q80 The SCM provider generator stops discovering repos, with GET https://api.github.com/orgs/org/repos: 403 API rate limit exceeded.
Intermediate
GET https://api.github.com/orgs/org/repos: 403 API rate limit exceeded.Likely causes โ No token or a shared token, and a short requeueAfterSeconds, so the controller lists the org too often.
Diagnose โ ApplicationSet controller logs; check the token's rate limit.
Fix โ Use a GitHub App (appSecretName) or a dedicated token via tokenRef, raise requeueAfterSeconds to 1800 or more, and add filters (repositoryMatch, labelMatch) to reduce API calls.
Prevent โ Webhooks to the ApplicationSet controller for event-driven refresh instead of tight polling.
Q81 Pull request generator preview environments are not created for new PRs.
Intermediate
Likely causes โ The PR does not carry the required label filter, the token lacks pull request read permission, the requeueAfterSeconds is long and no webhook is set, or the PR is from a fork (token cannot see it).
Diagnose โ Controller logs for the set; kubectl -n argocd get applicationset previews -o yaml | yq '.status'.
Fix โ Add the label, fix token scopes, and configure the ApplicationSet webhook (/api/webhook on the applicationset-controller service) for pull_request events.
Prevent โ Document the label and add a CI check that comments the preview URL so missing previews are noticed.
Q82 Progressive sync (RollingSync) settings are ignored; all apps update at once.
Advanced
Likely causes โ Progressive syncs are off by default in the ApplicationSet controller, or the step matchExpressions match no app labels, or the generated apps have their own automated sync, which RollingSync needs to control.
Diagnose โ kubectl -n argocd get cm argocd-cmd-params-cm -o yaml | grep progressive; kubectl -n argocd get applicationset fleet -o yaml | yq '.status.applicationStatus'.
Fix โ Set applicationsetcontroller.enable.progressive.syncs: "true", restart the controller, and ensure template labels match the step selectors (env: canary, env: prod).
Prevent โ Test the step order with a no-op change before relying on it for a real rollout.
Q83 Argo CD shows the app Suspended, and the deploy pipeline waiting on argocd app wait --health times out.
Intermediate
Suspended, and the deploy pipeline waiting on argocd app wait --health times out.Likely causes โ An Argo Rollout is paused at a canary step (pause: {} with no duration) waiting for promotion. Argo CD maps a paused Rollout to Suspended health.
Diagnose โ kubectl argo rollouts get rollout web -n web.
Fix โ Promote if metrics look good: kubectl argo rollouts promote web -n web, or abort. For pipelines, use argocd app wait web --health --suspended or switch to timed pauses with analysis.
Prevent โ Replace indefinite pauses with pause: {duration: 10m} plus an AnalysisTemplate, so promotion is automated.
Q84 A Rollout aborts with RolloutAborted: Rollout aborted update to revision 7: Metric "success-rate" assessed Failed due to failed (3) > failureLimit (2).
Intermediate
RolloutAborted: Rollout aborted update to revision 7: Metric "success-rate" assessed Failed due to failed (3) > failureLimit (2).Likely causes โ Either the new version really is bad (good, the system worked), or the query is wrong: it returns empty or NaN during low traffic, uses the wrong label for canary pods, or the threshold is unrealistic.
Diagnose โ
kubectl -n web get analysisrun
kubectl -n web describe analysisrun <name> # shows each measurement valueRun the PromQL manually in Prometheus for the same window.
Fix โ If the release is bad, fix and push a new image. If the query is wrong, handle empty results (... or vector(1) with care) and scope by rollouts-pod-template-hash.
Prevent โ Test analysis templates against historical data and require a minimum request count before judging.
Q85 An AnalysisRun shows Error with Post "http://prometheus.monitoring:9090/api/v1/query": dial tcp: lookup prometheus.monitoring on 10.96.0.10:53: no such host.
Beginner
Error with Post "http://prometheus.monitoring:9090/api/v1/query": dial tcp: lookup prometheus.monitoring on 10.96.0.10:53: no such host.Likely causes โ Wrong Prometheus address (short name instead of prometheus-server.monitoring.svc.cluster.local, wrong port), or a NetworkPolicy blocks the rollout namespace from reaching monitoring.
Diagnose โ kubectl -n monitoring get svc; test with kubectl run tmp --rm -it --image=curlimages/curl -- curl <address>/-/ready.
Fix โ Correct provider.prometheus.address in the AnalysisTemplate, or allow the traffic. Note that measurement errors count against consecutiveErrorLimit (default 4) and then abort.
Prevent โ Use a ClusterAnalysisTemplate maintained by the platform team with the verified address.
Q86 Argo CD Image Updater logs could not get tags from registry: denied: requested access to the resource is denied for a private ECR or GHCR image.
Intermediate
could not get tags from registry: denied: requested access to the resource is denied for a private ECR or GHCR image.Likely causes โ No registry credentials configured for that image, or the credentials (ECR tokens expire every 12 hours) went stale.
Diagnose โ kubectl -n argocd logs deploy/argocd-image-updater | grep denied.
Fix โ Configure pullsecret:namespace/secret for the image or registry in registries.conf, and for ECR use an ext: credential script or an ECR token refresher that updates the secret before expiry.
Prevent โ Alert on Image Updater errors; a silent updater means images silently stop rolling.
Q87 Image Updater bumps the tag, but within minutes the app reverts to the old image.
Advanced
Likely causes โ The write-back method is argocd (it writes parameter overrides on the Application object), and the Application is itself managed by an app-of-apps or ApplicationSet that overwrites the spec from Git on the next sync.
Diagnose โ argocd app get web -o yaml | yq '.spec.source.helm.parameters' before and after the revert; check ownerReferences or the parent app.
Fix โ Use Git write-back so the change lives in Git: write-back-method: git with write-back-target: kustomization or a Helm values file (.argocd-source-<app>.yaml) and a credential that can push.
Prevent โ Standardise on Git write-back for any app managed by GitOps of GitOps; the git history doubles as the deploy audit trail.
Q88 Image Updater with Git write-back fails with failed to push: authentication required or protected branch hook declined.
Intermediate
failed to push: authentication required or protected branch hook declined.Likely causes โ It reuses the repo credentials Argo CD uses for reading, which are read-only deploy keys; or the target branch is protected against direct pushes.
Diagnose โ Image Updater logs show the push error and the branch.
Fix โ Provide a write credential (git:secret:argocd/git-write-creds) and either allow the bot to bypass protection on that branch or write to a separate branch (write-back-branch: image-updates) that a CI job merges via PR.
Prevent โ Separate read and write credentials; keep a branch protection rule that allows only the bot's identity.
Secrets, Controller Performance & Recovery
๐ฅ Learn this hands-on with DevOps Shack โ YouTube @devopsshack ยท Hindi @shackverse ยท Courses at devopsshack.com
Q89 A Sealed Secret is not decrypted: the SealedSecret shows no key could decrypt secret (password).
Intermediate
no key could decrypt secret (password).Likely causes โ It was sealed with another cluster's public key, sealed for a different namespace/name (strict scope), or the controller's sealing keys were lost when the cluster was rebuilt.
Diagnose โ
kubectl -n kube-system get secret -l sealedsecrets.bitnami.com/sealed-secrets-key
kubectl -n web describe sealedsecret db-credsFix โ Re-seal against the right cert (kubeseal --fetch-cert --controller-namespace kube-system > cert.pem) and the correct namespace; on a rebuilt cluster, restore the backed-up key secret and restart the controller.
Prevent โ Back up sealing keys to a vault; this is part of cluster DR, not optional.
Q90 A KSOPS or SOPS-based app fails with Error: failed to get the data key required to decrypt the SOPS file.
Intermediate
Error: failed to get the data key required to decrypt the SOPS file.Likely causes โ The repo-server cannot access the key: missing age private key secret mount, IRSA role without kms:Decrypt on the CMK, or the file was encrypted with a recipient list that does not include the cluster's key.
Diagnose โ
kubectl -n argocd exec deploy/argocd-repo-server -- env | grep SOPS
grep -A3 'kms\|age' secrets.enc.yamlFix โ Mount the age key (SOPS_AGE_KEY_FILE) or grant KMS decrypt to the repo-server's role; re-encrypt with sops updatekeys after adding the cluster recipient to .sops.yaml.
Prevent โ Keep recipients in .sops.yaml and fail CI when an encrypted file lacks the cluster recipient.
Q91 argocd-vault-plugin apps fail with Replace: could not replace all placeholders in Template: ... secret not found.
Advanced
Replace: could not replace all placeholders in Template: ... secret not found.Likely causes โ The path in the <path:...#key> placeholder or the avp.kubernetes.io/path annotation is wrong, the KV version mismatches (KV v2 needs data/ in the path), or the plugin's Vault role cannot read it.
Diagnose โ vault kv get <path> with the same role; CMP sidecar logs in repo-server.
Fix โ Correct the path, KV version, or Vault policy. Note that AVP renders secrets into manifests, so they appear in Argo CD's cache and diff; consider moving to External Secrets Operator.
Prevent โ Prefer controllers that fetch secrets in-cluster (ESO, Vault Secrets Operator) so secret values never pass through the repo-server.
Q92 An ExternalSecret is SecretSyncedError with could not get secret data from provider, and the app is Degraded.
Beginner
SecretSyncedError with could not get secret data from provider, and the app is Degraded.Likely causes โ The remote key does not exist, the SecretStore's IAM role or service account cannot read it, or the key name/property differs.
Diagnose โ
kubectl -n web describe externalsecret db-creds
kubectl -n web get secretstore,clustersecretstore -o wideFix โ Create the key in the provider or fix the remoteRef; grant the role (for AWS, secretsmanager:GetSecretValue on that ARN).
Prevent โ Create secrets in the provider before merging the ExternalSecret, and alert on externalsecret_status_condition.
Q93 The application controller is OOMKilled repeatedly after onboarding a large cluster.
Advanced
Likely causes โ The controller caches every watched resource of every managed cluster; big clusters with many Events, Pods, ReplicaSets or CRs (Velero backups, Kyverno reports) blow up memory.
Diagnose โ
argocd admin cluster stats
kubectl -n argocd top pod -l app.kubernetes.io/name=argocd-application-controllerFix โ Exclude noisy kinds:
# argocd-cm
data:
resource.exclusions: |
- apiGroups: ["kyverno.io", "wgpolicyk8s.io"]
kinds: ["*"]
clusters: ["*"]Raise memory limits, and shard with more controller replicas (ARGOCD_CONTROLLER_REPLICAS).
Prevent โ Review exclusions when onboarding clusters; watch argocd_cluster_api_resource_objects.
Q94 Reconciliation is slow for all apps; argocd_app_reconcile p95 is minutes and the workqueue depth keeps growing.
Advanced
argocd_app_reconcile p95 is minutes and the workqueue depth keeps growing.Likely causes โ Too few processors for the number of apps, a slow repo-server (manifest generation backlog), or one heavy cluster starving others on a single shard.
Diagnose โ Check workqueue_depth, argocd_app_reconcile_bucket and argocd_git_request_duration_seconds in Prometheus; argocd admin cluster shards.
Fix โ Raise controller.status.processors (for example 50) and controller.operation.processors (25) in argocd-cmd-params-cm; scale repo-server replicas; add controller shards and use the round-robin or consistent-hashing sharding algorithm.
Prevent โ Capacity plan: track apps and resources per shard and scale before the queue grows.
Q95 The UI and CLI are slow and logs show Failed to get cached app state: dial tcp 10.96.40.2:6379: connect: connection refused.
Intermediate
Failed to get cached app state: dial tcp 10.96.40.2:6379: connect: connection refused.Likely causes โ Redis is down or restarting (OOM, node eviction), or in HA mode the HAProxy in front of Redis cannot reach a master.
Diagnose โ
kubectl -n argocd get pods -l app.kubernetes.io/name=argocd-redis
kubectl -n argocd logs deploy/argocd-redis --previousFix โ Restore Redis; Argo CD recomputes everything because Redis is only a cache, so expect a temporary CPU spike. Raise its memory limit if OOM.
Prevent โ Run the HA install (redis-ha) in production and alert on Redis availability.
Q96 Repo-server pods fail renders with write /tmp/...: no space left on device.
Intermediate
write /tmp/...: no space left on device.Likely causes โ Large monorepos and Helm chart caches fill the repo-server's ephemeral storage, especially with many revisions checked out in parallel.
Diagnose โ kubectl -n argocd exec deploy/argocd-repo-server -- df -h /tmp; check pod events for ephemeral storage eviction.
Fix โ Mount a larger emptyDir (with sizeLimit) or a dedicated volume on /tmp; scale out repo-server so each pod handles fewer repos; restart the pod to clear stale checkouts.
Prevent โ Split huge monorepos, and use argocd.argoproj.io/manifest-generate-paths so changes in unrelated paths do not trigger renders.
Q97 After upgrading Argo CD, applies fail with strict decoding error: unknown field "spec.sourceHydrator" or the CRD update fails with metadata.annotations: Too long.
Advanced
strict decoding error: unknown field "spec.sourceHydrator" or the CRD update fails with metadata.annotations: Too long.Likely causes โ The new controller expects newer CRD schemas, but the CRDs were not upgraded (Helm does not upgrade CRDs by default), or they were applied client-side and hit the annotation size limit.
Diagnose โ kubectl get crd applications.argoproj.io -o yaml | yq '.metadata.labels' and compare the schema with the release.
Fix โ Apply CRDs server-side for the target version:
kubectl apply -k "https://github.com/argoproj/argo-cd/manifests/crds?ref=v3.1.0" \
--server-side --force-conflictsWith the Helm chart, keep crds.install: true and upgrade the chart, not only the image tags.
Prevent โ Upgrade one minor version at a time, read the upgrade notes, and rehearse on a staging Argo CD.
Q98 The admin password is lost and argocd-initial-admin-secret was deleted long ago.
Beginner
argocd-initial-admin-secret was deleted long ago.Likely causes โ The initial secret is meant to be deleted after first login; the bcrypt hash lives in argocd-secret.
Diagnose โ kubectl -n argocd get secret argocd-secret -o yaml | grep admin.password.
Fix โ
HASH=$(argocd account bcrypt --password 'N3w-Str0ng-Pass')
kubectl -n argocd patch secret argocd-secret \
-p "{\"stringData\": {\"admin.password\": \"$HASH\", \"admin.passwordMtime\": \"$(date +%FT%T%Z)\"}}"Then log in and rotate.
Prevent โ Disable the local admin (admin.enabled: "false") once SSO works, and keep a sealed break-glass procedure.
Q99 Someone deleted an app-of-apps parent with cascade, and dozens of child apps and workloads disappeared. How do you recover?
Advanced
Likely causes โ The parent and children all had the resources-finalizer.argocd.argoproj.io finalizer, so deletion cascaded down to every workload.
Diagnose โ kubectl -n argocd get events, audit logs for the delete call; confirm which namespaces lost workloads.
Fix โ Re-apply the root Application from Git (kubectl apply -f bootstrap/root-app.yaml); Argo CD recreates children and workloads from Git. Restore stateful data (PVs, databases) from backups, since Git does not hold data.
Prevent โ Remove the finalizer from parent apps (only children should cascade), restrict delete on Applications in RBAC, enable deletion protection with argocd.argoproj.io/sync-options: Delete=false on critical resources, and back up Argo CD state with argocd admin export.
Q100 Argo CD must be rebuilt on a new management cluster after the old one was lost. Apps show Unknown and clusters Failed after restoring from backup.
Advanced
Unknown and clusters Failed after restoring from backup.Likely causes โ The backup restored Applications and settings, but cluster secrets reference tokens or IAM roles tied to the old cluster's identity (IRSA trust policy for the old OIDC provider), and repo credentials or SSO secrets were not in the backup.
Diagnose โ
argocd cluster list # connection status per cluster
argocd repo list
kubectl -n argocd logs deploy/argocd-application-controller | grep -i "failed to sync cluster"Fix โ Restore with argocd admin import - < backup.yaml (from argocd admin export), then update the IAM trust policies (or EKS access entries) for the new controller role, re-sync secrets from the external secret store, and refresh: argocd app list -o name | xargs -n1 argocd app get --hard-refresh.
Prevent โ Keep Argo CD itself declarative in Git (install values, projects, clusters via Terraform), store credentials in an external secret manager, and run a timed DR drill every quarter.