helm template --debug or helm install --dry-run --debug , which is best?

4/6/2020

I would like to know which is best between helm template --debug and helm install --dry-run --debug

Thank you

-- Eric Soucy
kubernetes-helm

1 Answer

4/7/2020

The difference between the two commands is that helm install --dry-run will send things to a Kubernetes cluster, but helm template won't.

My general experience has been that debugging intricate Go templates can be tricky, and if I'm having YAML issues (and especially if I have the Kubernetes API documentation up in a browser tab) the helm template output is more than sufficient for my needs, and is a little faster and has fewer dependencies. So I frequently use helm template.

In contrast, by the time I've gotten the Go templating logic and YAML formatting correct, I'm usually ready to actually do a test deployment; so when I helm install it's almost never with --dry-run. If I've gotten the object layout wrong this will still complain, and if it's right then I'm ready to start sending requests to the service.

-- David Maze
Source: StackOverflow