Skip to content
Latchkey

kustomize "accumulating resources ... evalsymlink failure" in CI

kustomize could not load a path listed in resources:/bases:. The file or directory does not exist where the kustomization expects it - a wrong relative path, an un-checked-out file, or a directory referenced as a file (or vice versa).

What this error means

kustomize build fails with accumulating resources from "<path>": evalsymlink failure ... no such file or directory or must build at directory. It is a filesystem error - kustomize never loaded the referenced resource.

kustomize output
Error: accumulating resources: accumulating resources from 'deployment.yaml':
evalsymlink failure on '/repo/overlays/prod/deployment.yaml' : lstat
/repo/overlays/prod/deployment.yaml: no such file or directory

Diagnose it: read events, not just status

A deployment that never becomes ready has the reason in its events and in the pod state, not in the deployment status. Read both before changing the manifest.

Terminal
kubectl rollout status deploy/<name> --timeout=120s
kubectl describe deploy/<name> | sed -n "/Events/,$p"
kubectl get pods -l app=<name> -o wide
kubectl describe pod <pod> | sed -n "/Events/,$p"
kubectl logs <pod> --previous --tail=50   # the crash before the restart

Common causes

Resource path wrong or missing

A resources: entry points at a file/dir that is not there relative to the kustomization.yaml - a typo, a moved file, or a path relative to the wrong directory.

Directory vs file confusion

A base must be a directory containing a kustomization.yaml; pointing resources: at a raw file in a remote base, or at a directory that lacks a kustomization, fails to accumulate.

Sparse/shallow checkout omitted the path

CI checked out only part of the repo, so a referenced base directory is absent on the runner even though it exists in git.

How to fix it

Confirm the path resolves from the kustomization

Paths in resources: are relative to the kustomization.yaml that lists them. List the directory to verify.

Terminal
ls -la overlays/prod/
kubectl kustomize overlays/prod

Fix the resource reference

  1. Make each resources: path relative to the kustomization.yaml, not the repo root.
  2. Point bases at a directory that contains its own kustomization.yaml.
  3. Ensure CI checks out the full tree (no over-narrow sparse checkout).

How to prevent it

  • Keep resources: paths relative to the kustomization file and committed to git.
  • Run kubectl kustomize <dir> in CI to catch path errors before apply.
  • Avoid sparse checkouts that drop referenced base directories.

Frequently asked questions

What causes kustomize "accumulating resources ... evalsymlink failure" in CI?
There are 3 common causes: resource path wrong or missing, directory vs file confusion, and sparse/shallow checkout omitted the path. A resources: entry points at a file/dir that is not there relative to the kustomization.yaml - a typo, a moved file, or a path relative to the wrong directory.
How do I fix kustomize "accumulating resources ... evalsymlink failure" in CI?
There are 2 fixes depending on which cause you have: confirm the path resolves from the kustomization and fix the resource reference. Work through them in order, since the first is the most common.
What does kustomize "accumulating resources ... evalsymlink failure" in CI actually mean?
kustomize build fails with accumulating resources from "<path>": evalsymlink failure ...
How do I stop kustomize "accumulating resources ... evalsymlink failure" in CI happening again?
Keep resources: paths relative to the kustomization file and committed to git. The prevention section lists 3 changes that keep it from recurring.

Related guides

References

Not every red build is your code. Latchkey repairs the ones that are not, on the runner. Start free → 30-day trial · No credit card