Skip to main content
After developing your first Helm chart, it’s crucial to verify its functionality. There are three primary methods to validate your Helm chart before installation:
  1. Linting – Checks that the chart and its YAML syntax are correct.
  2. Template Rendering – Confirms that the templating logic generates the expected manifest.
  3. Dry Run Install – Simulates an installation on Kubernetes to catch issues that only Kubernetes validation can reveal.
Below, we detail each verification method.

1. Linting the Chart

Linting helps catch formatting errors and typos (for example, misaligned spaces or incorrect variable names such as a misspelling of “release”). Use the following command to lint your chart:
The above output indicates:
  • An error on line 4 due to a typo in the variable name.
  • A YAML indentation issue on line 20.
After addressing these issues, re-run the lint command. A successful linting process will output:
Including an icon in the Chart.yaml file is recommended as it enhances chart identification.

2. Verifying Template Rendering

Once linting confirms correct formatting, the next step is to ensure that the templating logic produces the intended Kubernetes manifest. This process renders placeholders such as .Release.Name and variables defined in the values file. Run the command below to render the template locally:
The rendered output may look similar to this:
Notice that the release name is incorporated as “hello-world-1” from the command. If no name is provided, Helm defaults to a generated release name. If there is a YAML indentation or templating error, you might see an error message like:
In such cases, use the debug flag to help diagnose the issue:
This debug output aids in identifying and fixing any rendering issues.

3. Simulating an Installation with a Dry Run

Linting and template rendering catch many issues; however, they might not detect errors within the final manifest applied to Kubernetes. For example, if the Deployment spec mistakenly uses “container” instead of “containers”, the issue won’t be caught by earlier checks. Consider the following incorrect manifest snippet:
Since the YAML structure and templating appear correct, neither linting nor template rendering flags this error. To validate the entire manifest against Kubernetes standards, execute the following dry-run command:
After correcting the mistake and re-running the dry run, you should observe a successful simulated installation with detailed manifest output:
Using the dry run option is instrumental in verifying that Kubernetes accepts your final manifests. This step minimizes the risk of encountering runtime errors during actual deployment.

Summary

In this guide, we explored the three critical methods to verify your Helm charts:
  • Linting checks for formatting and syntax errors.
  • Template Rendering confirms correct variable substitution and manifest creation.
  • Dry Run Installation validates the final manifest against Kubernetes APIs.
Implement these practices to confidently build, validate, and deploy your Helm charts. Happy charting!

Quick Reference Table

For additional insights and detailed Kubernetes concepts, visit the Kubernetes Documentation.

Watch Video

Practice Lab