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.
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 directoryDiagnose 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.
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 restartCommon 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.
ls -la overlays/prod/
kubectl kustomize overlays/prodFix the resource reference
- Make each
resources:path relative to the kustomization.yaml, not the repo root. - Point bases at a directory that contains its own kustomization.yaml.
- 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.