GoogleContainerTools/skaffold · error

CONFIG_MISSING_MANIFEST_FILE_ERR

CONFIG_MISSING_MANIFEST_FILE_ERR

Error message

Manifest file %q referenced in skaffold config could not be found

What it means

During kubectl-targeted validation, Skaffold expands each manifest path/glob listed in the config (e.g. `deploy.kubectl.manifests` or render rawK8s patterns). If a pattern expands to zero files, the referenced manifest file cannot be found on disk, so this error is raised with a YAML location pointing at the config entry.

Source

Thrown at pkg/skaffold/schema/validation/validation.go:877

		// validate that manifest files referenced in config exist
		for _, pattern := range c.Render.RawK8s {
			if util.IsURL(pattern) {
				continue
			}
			// filepaths are all absolute from config parsing step via tags.MakeFilePathsAbsolute
			expanded, err := filepath.Glob(pattern)
			if err != nil {
				errs = append(errs, ErrorWithLocation{
					Error: err,
				})
			}
			if len(expanded) == 0 {
				// TODO(aaron-prindle) currently this references the whole manifest list and not the specific entry
				// this is related to the fact that string pointers do not work with the current setup, need to get the closest struct
				// TODO(aaron-prindle) parse the manifest node to extract exact correct line # for the value here (currently it is the parent obj)
				msg := fmt.Sprintf("Manifest file %q referenced in skaffold config could not be found", pattern)
				errMsg := wrapWithContext(c, ErrorWithLocation{
					Error:    errors.New(msg),
					Location: c.YAMLInfos.Locate(&c.Render.RawK8s),
				})
				errs = append(errs, ErrorWithLocation{
					Error: sErrors.NewError(errMsg[0].Error,
						&proto.ActionableErr{
							Message: errMsg[0].Error.Error(),
							ErrCode: proto.StatusCode_CONFIG_MISSING_MANIFEST_FILE_ERR,
							Suggestions: []*proto.Suggestion{
								{
									SuggestionCode: proto.SuggestionCode_CONFIG_FIX_MISSING_MANIFEST_FILE,
									Action:         fmt.Sprintf("Verify that file %q referenced in config %q exists and the path and naming are correct", pattern, c.SourceFile),
								},
							},
						}),
					Location: errMsg[0].Location,
				})
			}
		}

View on GitHub (pinned to a1189de023)

Solutions

  1. Create the missing manifest file or fix the path/glob in skaffold.yaml so it matches existing files.
  2. Run the manifest generator (e.g. kustomize build, helm template) before skaffold if the file is generated.
  3. Verify relative paths resolve from the directory where you invoke skaffold; adjust or cd to the config's directory.
  4. Check pattern spelling and case sensitivity (Linux filesystems are case-sensitive).

Example fix

# before
manifests:
  - k8s/*.yaml   # directory missing
# after
manifests:
  - deploy/k8s/*.yaml
Defensive patterns

Strategy: validation

Validate before calling

const patterns = cfg.deploy?.kubectl?.manifests ?? [];
for (const p of patterns) {
  if (!glob.sync(p, { cwd: configDir }).length) throw new Error(`manifest pattern matches no files: ${p}`);
}

Try / catch

try {
  execSync('skaffold render -o /dev/null', { stdio: 'inherit' });
} catch (e) {
  if (String(e).includes('could not be found')) fixManifestPaths();
}

Prevention

When it happens

Trigger: `manifests:` entry points to a file that doesn't exist; a glob (e.g. ` manifests/*.yaml`) matches nothing because the directory is empty, missing, or the pattern is wrong; running from a different working directory so relative paths don't resolve; profile overlays referencing manifests excluded by .gitignore/kazel transforms.

Common situations: Cloning a repo where generated manifests weren't built yet; renaming a k8s directory without updating skaffold.yaml; case-sensitive filesystem mismatch (Kustomize.yaml vs kustomize.yaml); CI running from repo root while paths are relative to a subdir.

Related errors


AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05). Data as JSON: /api/errors/b0f014bd66e32e27. Report an issue: GitHub.