Chapter 6: Testing Helm Charts
Here are some answers to the questions presented in this chapter:
- The
helm templatecommand is used to generate your Helm templates locally. Thehelm lintcommand 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 templatecommand to generate your YAML resources locally to ensure they were generated properly. You can also use the--verifyflag to check with the API server that your YAML schemas are correct without installing the resources. Thehelm install --dry-runcommand 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
yamllinttool. It can be used alongsidehelm templateto lint your generated resources (for example,helm template my-test test-chart | yamllint...