kustomize "unable to find one of kustomization.yaml" in CI
kustomize build (or kubectl apply -k) expects the target directory to contain a kustomization.yaml, kustomization.yml, or Kustomization. When none is present it reports that it cannot find one and refuses to build.
What this error means
kustomize build DIR fails with "unable to find one of 'kustomization.yaml', 'kustomization.yml' or 'Kustomization' in directory \"DIR\"".
Error: unable to find one of 'kustomization.yaml', 'kustomization.yml' or
'Kustomization' in directory '/repo/manifests'Common causes
The build points at the wrong directory
The path targets a folder of raw manifests with no kustomization file, so there is nothing for kustomize to accumulate.
The file is named differently or uncommitted
A file named kustomize.yaml (wrong spelling) or an uncommitted kustomization means kustomize finds none of the accepted names.
How to fix it
Point at a directory with a kustomization
- Confirm the overlay directory contains
kustomization.yaml. - Point the build at that directory, not a raw manifest folder.
- Create a kustomization that lists the raw manifests if needed.
kustomize build overlays/prodCreate a kustomization for raw manifests
Add a kustomization.yaml that references the plain manifests so kustomize has an entry point.
# manifests/kustomization.yaml
resources:
- deployment.yaml
- service.yamlHow to prevent it
- Use the exact filename kustomization.yaml (correct spelling).
- Commit the kustomization alongside the manifests.
- Point CI at overlay directories, not raw manifest folders.