Debugging Helm Templates

Debugging Helm Templates

When installing Helm charts, at some point you will need to test your code and ensure that the template is rendering as expected. It’s like a debug mode before you commit to installing the chart. Templates get rendered on the Tiller server not the Helm client. Templates are then sent to the Kubernetes API Server. For this reason it can quickly become tricky to debug YAML files without seeing the output that is generated.

Helm has an extremely useful command that can ensure the Tiller server returns you the output of the rendered template. It also runs the checks involved in deploying this template, this will give you great insights into any problems that may occur. Displaying the output helps ensure the chart you are installing is doing what was expected.

Outputting Debug Comments

Inside of templates, YAML comments prefixed with # also appear in the output when specifying the –debug command alongside helm install.

# This value should always be < 100.

Helm Install Debug & Dry Run Example.

helm install --debug --dry-run --name haproxy-ingress incubator/haproxy-ingress
You can see the rendered template above returned from the Tiller server.
Omitted additional lines for brevity.

Note: At this point the chart is not installed.