Helm uses a packaging format called charts (a collection of Kubernetes resource files).
This note shows how to
--debug Helm chart templates with examples.
It also shows how to lint and render Helm chart YAMLs locally (without sending them to a Kubernetes API server).
Cool Tip: List Helm charts and repositories using a
helm command! Read more →
Helm: Dry Run & Template Debug
--debug options with the
helm install command to test a Helm chart template rendering without actually installing anything:
$ helm install <chartName> <repoName>/<chartPath> --dry-run --debug - example - $ helm install nginx-ingress nginx-stable/nginx-ingress --dry-run --debug
The command above will send the chart to the tiller (the server portion of Helm, that typically runs on a Kubernetes cluster), which will render the template.
But instead of installing the chart, the command above will just print the rendered template.
If you are not connected to the Kubernetes cluster you may receive an error as follows:
Error: INSTALLATION FAILED: Kubernetes cluster unreachable: Get “http://localhost:8080/version”: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
Cool Tip: How to download a Helm chart and save it locally! Read more →
To debug the Helm chart templates without sending them to a Kubernetes API server, you can download the chart and render it locally using the following command:
$ helm template <chartFolder|chartArchive> - examples - $ helm template ./nginx-ingress $ helm template nginx-ingress-0.15.2.tgz
You can also lint the Helm chart to verify its validity and that it follows the best practices:
$ helm lint <chartFolder|chartArchive> - examples - $ helm lint ./nginx-ingress $ helm lint nginx-ingress-0.15.2.tgz
Happy Helm chart templates debugging!