Skip to content
Latchkey

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\"".

kustomize
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

  1. Confirm the overlay directory contains kustomization.yaml.
  2. Point the build at that directory, not a raw manifest folder.
  3. Create a kustomization that lists the raw manifests if needed.
Terminal
kustomize build overlays/prod

Create a kustomization for raw manifests

Add a kustomization.yaml that references the plain manifests so kustomize has an entry point.

kustomization.yaml
# manifests/kustomization.yaml
resources:
  - deployment.yaml
  - service.yaml

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

Related guides

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