kustomize build "evalsymlink failure" in CI
kustomize tries to resolve every path to a real, existing location and one could not be resolved. "evalsymlink failure" means the target file or directory is missing, or a symlink points somewhere absent in the CI checkout.
What this error means
kustomize build fails with "evalsymlink failure on \"/path\" : lstat /path: no such file or directory" while loading a resource or base.
Error: accumulating resources: accumulation err='accumulating resources from '../base':
evalsymlink failure on '/repo/overlays/base' : lstat /repo/overlays/base:
no such file or directory'Common causes
The referenced path does not exist
A base or resource path is off by one directory or was renamed, so the target cannot be resolved to a real path.
A symlink points outside the checkout
A symlinked base targets a path that exists locally but is absent on the runner, so resolution fails.
How to fix it
Fix the relative path to the base
- Check the directory depth from the overlay to the base.
- Correct the
resources:path so it resolves to a real directory. - Run
kustomize buildfrom the overlay to confirm resolution.
# overlay references the base one level up
resources:
- ../baseAvoid symlinks that leave the repo
Replace out-of-tree symlinks with in-repo relative paths, or allow the path explicitly with a load restrictor override.
kustomize build --load-restrictor LoadRestrictionsNone overlays/prodHow to prevent it
- Keep bases and overlays inside the repo with relative paths.
- Avoid symlinks whose targets are not committed.
- Build every overlay in CI so broken paths surface immediately.