GoogleContainerTools/skaffold · error

helm version command failed %q: %w

Error message

helm version command failed %q: %w

What it means

At deployer construction Skaffold runs `helm version --client` to detect the installed Helm version (Helm v2 support was dropped). If the command fails (binary missing, not executable, or exits non-zero), this wrapped error is returned with the captured stdout. It blocks creating the Helm deployer at all.

Source

Thrown at pkg/skaffold/helm/bin.go:88

type Client interface {
	EnableDebug() bool
	OverrideProtocols() []string
	ConfigFile() string
	KubeConfig() string
	KubeContext() string
	Labels() map[string]string
	GlobalFlags() []string
	ManifestOverrides() map[string]string
}

// BinVer returns the version of the helm binary found in PATH.
func BinVer(ctx context.Context) (semver.Version, error) {
	// Helm v2 needed the `--client` to avoid connecting to Kubernetes.
	// Support for Helm v2 was dropped here.
	cmd := exec.CommandContext(ctx, "helm", "version")
	b, err := util.RunCmdOut(ctx, cmd)
	if err != nil {
		return semver.Version{}, fmt.Errorf("helm version command failed %q: %w", string(b), err)
	}
	raw := string(b)
	matches := VersionRegex.FindStringSubmatch(raw)
	if len(matches) == 0 {
		return semver.Version{}, fmt.Errorf("unable to parse output: %q", raw)
	}
	return semver.ParseTolerant(matches[1])
}

// PreparePostRenderer conditionally installs a post renderer plugin (starting from Helm v4) and returns
// an optional cleanup function in that case, plus in any case the needed command line arguments
func PreparePostRenderer(ctx context.Context, h Client, skaffoldBinary string, helmVersion semver.Version) (func(), []string, error) {
	if helmVersion.LT(Helm4PostRendererVersion) {
		return nil, []string{"--post-renderer", skaffoldBinary}, nil
	}

	// Helm v4 logic

View on GitHub (pinned to a1189de023)

Solutions

  1. Install Helm: `curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash` or your package manager
  2. Ensure the helm binary is on PATH in the environment running Skaffold (`which helm`)
  3. Make it executable: `chmod +x $(which helm)`
  4. Run `helm version` manually to confirm it exits 0
  5. Install Helm 3+ (v2 is unsupported)

Example fix

// Dockerfile before
RUN skaffold ...
// after
RUN curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
RUN skaffold ...
Defensive patterns

Strategy: validation

Validate before calling

if ! command -v helm >/dev/null 2>&1; then echo "helm not on PATH"; exit 1; fi
helm version || { echo "helm version failed"; exit 1; }

Prevention

When it happens

Trigger: `exec.CommandContext(ctx, "helm", "version")` returns an error via util.RunCmdOut: helm is not installed or not on PATH, the binary is not executable, or an old/broken helm exits non-zero.

Common situations: Helm not installed in CI container image; PATH lacks /usr/local/bin in the Skaffold environment; helm binary with wrong permissions (chmod +x missing); corrupted install.

Related errors


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