Skip to content
Latchkey

kustomize "must specify --enable-helm" for helmCharts in CI

The helmCharts field runs the Helm chart inflation generator, which is off by default because it shells out to helm. kustomize errors with "must specify --enable-helm" until you pass the flag (and have helm installed).

What this error means

kustomize build or kubectl apply -k fails with "Error: must specify --enable-helm" when the kustomization declares a helmCharts block.

kustomize
Error: must specify --enable-helm

Common causes

The helm generator is disabled by default

Because it executes helm, kustomize requires an explicit opt-in flag to inflate charts declared in helmCharts.

helm is not installed on the runner

Even with the flag, chart inflation needs the helm binary; a runner without helm cannot inflate the chart.

How to fix it

Enable the helm generator

Pass --enable-helm on kustomize, or --enable-helm on kubectl, and ensure helm is installed.

Terminal
kustomize build --enable-helm overlays/prod
# or with kubectl
kubectl apply -k overlays/prod --enable-helm

Install helm before the build

Inflation shells out to helm, so install it in a setup step.

.github/workflows/ci.yml
- uses: azure/setup-helm@v4
  with:
    version: v3.15.0

How to prevent it

  • Pass --enable-helm wherever a kustomization uses helmCharts.
  • Install helm on the runner alongside kustomize.
  • Pin chart versions in helmCharts for reproducible inflation.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →