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

> Fix kustomize "accumulating resources from 'x': evalsymlink failure" / "must build at directory" in CI - a missing resource path, wrong working directory, or a file referenced as a directory.

Source: https://latchkey.dev/learn/kubernetes/kustomize-build-failed-to-load-resource  
Updated: 2026-06-25

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).

## 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
```

> `--previous` gives you the logs of the container that died, which is the one that explains a CrashLoopBackOff. The current container is usually still starting and tells you nothing.

## FAQ

### 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.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
