Chapter 6: Testing Helm Charts
Here are some answers to the questions presented in this chapter:
- The
helm template
command is used to generate your Helm templates locally. Thehelm lint
command is used to lint for errors in your chart’s structure and chart definition file. It also attempts to find errors that will result in a failed installation. - To validate your chart templates prior to installation, you can run the
helm template
command to generate your YAML resources locally to ensure they were generated properly. You can also use the--verify
flag to check with the API server that your YAML schemas are correct without installing the resources. Thehelm install --dry-run
command can also perform this check with the API server prior to installation. - One tool that can be used to lint the style of your YAML resources is the
yamllint
tool. It can be used alongsidehelm template
to lint your generated resources (for example,helm template my-test test-chart | yamllint...