GoogleContainerTools/skaffold · error

rendering manifests: %w

Error message

rendering manifests: %w

What it means

Wraps a failure from Runner.Render during `skaffold delete`. After building, delete renders the manifests to determine which resources to clean up; render failures (manifest templating, kustomize/kpt errors, hydration problems) abort the cleanup. The wrapped errR/err carries the renderer-specific cause.

Source

Thrown at cmd/skaffold/app/cmd/delete.go:58

		WithExample("Print the resources to be deleted", "delete --dry-run").
		WithFlags([]*Flag{
			{Value: &dryRun, Name: "dry-run", DefValue: false, Usage: "Don't delete resources, just print them.", IsEnum: true},
		}).
		NoArgs(doDelete)
}

func doDelete(ctx context.Context, out io.Writer) error {
	opts.DigestSource = constants.TagDigestSource
	opts.RenderOnly = true
	return withRunner(ctx, out, func(r runner.Runner, configs []util.VersionedConfig) error {
		bRes, err := r.Build(ctx, io.Discard, targetArtifacts(opts, configs))
		if err != nil {
			return fmt.Errorf("executing build: %w", err)
		}

		manifestListByConfig, err := r.Render(ctx, io.Discard, bRes, false)
		if err != nil {
			return fmt.Errorf("rendering manifests: %w", err)
		}
		return r.Cleanup(ctx, out, dryRun, manifestListByConfig, opts.Command)
	})
}

View on GitHub (pinned to a1189de023)

Solutions

  1. Read the wrapped error for the renderer-specific cause (kustomize/kpt/helm) and fix the manifest source
  2. Restore the manifest files/config to the state used at deploy time
  3. Fall back to manual cleanup: kubectl delete on the deployed resources or `kubectl delete all -l <app-label>`
  4. Run `skaffold render` standalone to debug the render pipeline

Example fix

// before: kustomization.yml references missing secret-generator
// after
rm -rf overlays/dev/secret-generator.yaml  # or restore the file
skaffold render   # confirm render succeeds before delete
Defensive patterns

Strategy: validation

Validate before calling

# validate manifests render before relying on delete
skaffold render --output /tmp/check.yaml && echo "render OK"

Try / catch

if err := run(); err != nil {
    if strings.Contains(err.Error(), "rendering manifests:") {
        // fall back to kubectl-based cleanup using stored manifests
    }
}

Prevention

When it happens

Trigger: `skaffold delete` reaches r.Render and the renderer fails: bad kustomize overlay, kpt/helm templating error, missing remote base, or invalid manifests in skaffold.yaml.

Common situations: Kustomize patches referencing files that no longer exist; helm values changed; kpt function failing; user edited manifests after deploy so they no longer render.

Related errors


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