GoogleContainerTools/skaffold · error

nothing to deploy

Error message

nothing to deploy

What it means

After rendering/loading manifests, the kubectl deployer checks whether there is anything to deploy. If the manifest list is empty (no resources matched the configured manifests), Deploy aborts with 'nothing to deploy'. This guards against silently succeeding while deploying zero resources.

Source

Thrown at pkg/skaffold/deploy/kubectl/kubectl.go:232

	// if any hydrated manifests are passed to `skaffold apply`, only deploy these
	// also, manually set the labels to ensure the runID is added
	if len(k.hydratedManifests) > 0 {
		_, endTrace = instrumentation.StartTrace(ctx, "Deploy_readHydratedManifests")
		manifests, err = k.kubectl.ReadManifests(ctx, k.hydratedManifests)
		if err != nil {
			endTrace(instrumentation.TraceEndError(err))
			return err
		}
		manifests, err = manifests.SetLabels(k.labeller.Labels(), manifest.NewResourceSelectorLabels(k.transformableAllowlist, k.transformableDenylist))
		endTrace()
	}

	if err != nil {
		return err
	}

	if len(manifests) == 0 {
		return fmt.Errorf("nothing to deploy")
	}

	// Add debug transformations
	debugHelpersRegistry, err := config.GetDebugHelpersRegistry(k.globalConfig)
	if err != nil {
		return err
	}
	if manifests, err = manifest.ApplyTransforms(manifests, builds, k.insecureRegistries, debugHelpersRegistry); err != nil {
		return err
	}

	childCtx, endTrace = instrumentation.StartTrace(ctx, "Deploy_LoadImages")
	if err := k.imageLoader.LoadImages(childCtx, out, k.localImages, k.originalImages, builds); err != nil {
		endTrace(instrumentation.TraceEndError(err))
		return err
	}
	endTrace()

View on GitHub (pinned to a1189de023)

Solutions

  1. Check that the configured manifest paths / hydrated manifests files exist and are non-empty (cat the file).
  2. Fix kustomization.yaml / hydration so rendered output contains resources (run kustomize build manually).
  3. Review skaffold.yaml kubectl deploy manifests config for wrong paths or filtering.
  4. If intentionally deploying nothing, skip the deploy step instead of invoking Deploy.

Example fix

// before: skaffold.yaml points at empty file
manifests: { rawYaml: [out/empty.yaml] }
// after
manifests: { rawYaml: [k8s/*.yaml] }
Defensive patterns

Strategy: validation

Validate before calling

// Ensure rendered manifests are non-empty before deploying
info, err := os.Stat(hydratedFile)
if err != nil || info.Size() == 0 {
    return fmt.Errorf("hydrated manifests %s are empty; fix hydration", hydratedFile)
}

Try / catch

if err := deployer.Deploy(ctx, out, artifacts); err != nil {
    if strings.Contains(err.Error(), "nothing to deploy") {
        log.Errorf("no manifests resolved — check skaffold.yaml manifest paths")
    }
    return err
}

Prevention

When it happens

Trigger: len(manifests) == 0 in kubectl Deploy — the hydrated/rendered input produced no documents: empty hydrated manifests, --hydration filter removed everything, or the manifest files/paths resolved to empty output.

Common situations: `skaffold apply --hydrated-manifests=file` pointing at an empty file; kustomize/hydration output empty due to a misconfigured kustomization.yaml; all resources filtered out by labels/paths in the skaffold.yaml kubectl deploy config.

Related errors


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