Skip to content
LatchkeyLatchkey home

helmfile template: Render Manifests Locally

helmfile template renders every release to plain Kubernetes YAML locally, with no cluster connection required.

For offline validation, policy checks, or committing rendered manifests, template turns your helmfile into static YAML you can lint and scan.

What it does

helmfile template runs helm template for every release and prints the combined Kubernetes manifests. It does not contact the cluster, so it is safe in untrusted CI and useful for piping into validators like kubeconform or conftest.

Common usage

Terminal
helmfile -e production template > rendered.yaml
# render each release into its own directory
helmfile template --output-dir ./out --include-crds
# validate the rendered output
helmfile template | kubeconform -strict -summary

Options

FlagWhat it does
--output-dir <dir>Write each release to a separate directory
--include-crdsInclude CRDs from charts in the output
--skip-testsOmit chart test hooks from the output
--selector key=valueRender only matching releases

In CI

template needs no kubeconfig, so it runs in pull-request checks without cluster credentials. Pipe its output into a schema validator (kubeconform) or a policy engine (conftest) to catch bad manifests before they ever reach apply.

Common errors in CI

"Error: template: ... executing ... at <...>: nil pointer evaluating ..." is a chart templating bug, usually a value the chart expects that your values file omits. "Error: found in Chart.yaml, but missing in charts/ directory" means a dependency was not fetched; run helm dependency build or helmfile deps first.

Using this in CI

A runner has no kubeconfig, no cached context, and no interactive auth. Every kubectl invocation in CI needs the context supplied explicitly, and most confusing CI failures here are the command running against the wrong cluster or no cluster at all.

Terminal
# never rely on the ambient context on a runner
kubectl --context "$KUBE_CONTEXT" -n "$NAMESPACE" get pods

# confirm what you are actually connected to before mutating anything
kubectl config current-context
kubectl cluster-info

# fail fast instead of hanging on an unreachable API server
kubectl --request-timeout=30s get nodes

Frequently asked questions

helmfile template: Render Manifests Locally?
For offline validation, policy checks, or committing rendered manifests, template turns your helmfile into static YAML you can lint and scan.
What it does?
helmfile template runs helm template for every release and prints the combined Kubernetes manifests. It does not contact the cluster, so it is safe in untrusted CI and useful for piping into validators like kubeconform or conftest.
In CI?
template needs no kubeconfig, so it runs in pull-request checks without cluster credentials. Pipe its output into a schema validator (kubeconform) or a policy engine (conftest) to catch bad manifests before they ever reach apply.
Common errors in CI?
"Error: template: ... executing ... at <...>: nil pointer evaluating ..." is a chart templating bug, usually a value the chart expects that your values file omits. "Error: found in Chart.yaml, but missing in charts/ directory" means a dependency was not fetched; run helm dependency build or helmfile deps first.

Related guides

References

Run this faster and cheaper on Latchkey managed runners - self-healing included. Start free → 30-day trial · No credit card