Verifying Helm templating
In the previous chapter, we built a Helm chart from scratch. The final product was quite complex, containing parameterization, conditional templating, and life cycle hooks. Since one of the primary purposes of Helm is to create Kubernetes resources, you should ensure that your resource templates are generated properly before they are applied to a Kubernetes cluster. This can be done in a variety of ways, which we will discuss in the following section.
Validating template generation locally with helm template
The first way to validate your chart's templating is to use the helm template
command, which can be used to render a chart template locally and display its fully rendered contents in the standard output.
The helm template
command has the following syntax:
$ helm template [NAME] [CHART] [flags]
This command renders a template locally, using the NAME
argument to satisfy the .Release
built-in object and the CHART
argument for the chart...