Helm export YAML files locally (just use templating engine, do not send to Kubernetes)

j9dy picture j9dy · May 29, 2018 · Viewed 31.1k times · Source

I want to export already templated Helm Charts as YAML files. I can not use Tiller on my Kubernetes Cluster at the moment, but still want to make use of Helm Charts. Basically, I want Helm to export the YAML that gets send to the Kubernetes API with values that have been templated by Helm. After that, I will upload the YAML files to my Kubernetes cluster.

I tried to run .\helm.exe install --debug --dry-run incubator\kafka but I get the error Error: Unauthorized.

Note that I run Helm on Windows (version helm-v2.9.1-windows-amd64).

Answer

Amrit Bera picture Amrit Bera · May 29, 2018

We need logs to check the Unauthorized issue.

But you can easily generate templates locally:

helm template mychart

Render chart templates locally and display the output.

This does not require Tiller. However, any values that would normally be looked up or retrieved in-cluster will be faked locally. Additionally, none of the server-side testing of chart validity (e.g. whether an API is supported) is done.

More info: https://docs.helm.sh/helm/#helm-template