{"record":{"id":"918582d44eb6a6fc","repo":"GoogleContainerTools/skaffold","slug":"no-kustomization-configuration-found-in-directory-918582","errorCode":null,"errorMessage":"no Kustomization configuration found in directory: %s","messagePattern":"no Kustomization configuration found in directory: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/render/renderer/kustomize/kustomize.go","lineNumber":556,"sourceCode":"\t\tif generator.EnvSource != \"\" {\n\t\t\tenvs = append(envs, generator.EnvSource)\n\t\t}\n\t\tdeps = append(deps, sUtil.AbsolutePaths(dir, envs)...)\n\t}\n\n\treturn deps, nil\n}\n\n// FindKustomizationConfig finds the kustomization config relative to the provided dir.\n// A Kustomization config must be at the root of the directory. Kustomize will\n// error if more than one of these files exists so order doesn't matter.\nfunc FindKustomizationConfig(dir string) (string, error) {\n\tfor _, candidate := range constants.KustomizeFilePaths {\n\t\tif local, _ := pathExistsLocally(candidate, dir); local {\n\t\t\treturn filepath.Join(dir, candidate), nil\n\t\t}\n\t}\n\treturn \"\", fmt.Errorf(\"no Kustomization configuration found in directory: %s\", dir)\n}\n\nfunc pathExistsLocally(filename string, workingDir string) (bool, os.FileMode) {\n\tpath := filename\n\tif !filepath.IsAbs(filename) {\n\t\tpath = filepath.Join(workingDir, filename)\n\t}\n\tif f, err := os.Stat(path); err == nil {\n\t\treturn true, f.Mode()\n\t}\n\treturn false, 0\n}\n\n// kustomizeBuildArgs returns a list of build args to be passed to kustomize build.\nfunc kustomizeBuildArgs(buildArgs []string, kustomizePath string) []string {\n\tvar args []string\n\n\tif len(buildArgs) > 0 {","sourceCodeStart":538,"sourceCodeEnd":574,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/render/renderer/kustomize/kustomize.go#L538-L574","documentation":"FindKustomizationConfig checks each of constants.KustomizeFilePaths (kustomization.yaml, kustomization.yml, Kustomization) in a directory and errors when none exist. Called from DependenciesForKustomization while resolving a kustomize directory into its file dependencies.","triggerScenarios":"A path in Kustomize.Paths resolves (after expansion) to a directory with no recognized kustomization file present.","commonSituations":"Wrong directory in skaffold.yaml (parent of overlays rather than the overlay); file named kustomisation.yaml (British spelling); file extension .yaml vs .yml mismatch with none of the three candidates; uncommitted kustomization.yaml in CI checkout.","solutions":["Create kustomization.yaml (or yml / Kustomization) in the target directory","Correct the configured path to the directory that actually holds the kustomization file","Rename misspelled variants (kustomisation.yaml) to an accepted candidate name","Verify the file exists in CI (git add/commit, correct checkout)"],"exampleFix":"// before\nls base/   # only deployment.yaml\n// after\nprintf 'resources:\\n  - deployment.yaml\\n' > base/kustomization.yaml","handlingStrategy":"validation","validationCode":"func hasKustomization(dir string) bool {\n    for _, n := range []string{\"kustomization.yaml\",\"kustomization.yml\",\"Kustomization\"} {\n        if _, err := os.Stat(filepath.Join(dir, n)); err == nil { return true }\n    }\n    return false\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only configure kustomize.paths that directly contain a kustomization file","Standardize on kustomization.yaml spelling across the repo","Add a repo lint step asserting each configured path passes FindKustomizationConfig equivalent"],"tags":["kustomize","file-not-found","skaffold"],"backgroundTag":"kustomization-file-not-found","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}