Skip to content
Latchkey

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.

kustomize
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

  1. Check the directory depth from the overlay to the base.
  2. Correct the resources: path so it resolves to a real directory.
  3. Run kustomize build from the overlay to confirm resolution.
kustomization.yaml
# overlay references the base one level up
resources:
  - ../base

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

Terminal
kustomize build --load-restrictor LoadRestrictionsNone overlays/prod

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

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →