helm dry run install

12/19/2017

I am trying to test my development helm chat deployment output using --dry-run option. when I run the below command its trying to connect to Kubernetes API server.

Is dry run option required to connect Kubernetes cluster? all I want to check the deployment yaml file output.

helm install mychart-0.1.0.tgz --dry-run --debug

Error: Get http://localhost:8080/api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
-- sfgroups
kubernetes
kubernetes-helm

3 Answers

5/8/2018

There is also an option to run helm template ./mychart to render the generated YAMLs without needing the connection to tiller. Combined with helm lint it's a great set to verify validity of your chart.

-- Eldad Assis
Source: StackOverflow

12/19/2017

As stated on Helm's documentation

When you want to test the template rendering, but not actually install anything, you can use helm install --debug --dry-run ./mychart. This will send the chart to the Tiller server, which will render the templates. But instead of installing the chart, it will return the rendered template to you so you can see the output

So it still needs to connect to Tiller to render your templates with the right values. The difference when using the --dry-run option is that it won't actually install the chart.

-- Jose Armesto
Source: StackOverflow

4/17/2020

There is a minor diff between the helm install helm install --dry-run and help template command:

  • helm install --dry-run will send your chart to the tiller which will verify and render the manifest files against the K8S specs along with the YAML validations.

  • help template will only generate the manifest and verify if your YAML file is valid. However, it won't check if the generated manifests are valid Kubernetes resources. Ref: Helm Docs

Hope this helps!

-- Kalpesh Chaudhari
Source: StackOverflow