Understanding chart templates
The primary purpose of a Helm chart is to create and manage the Kubernetes resources that make up an application. This is accomplished through chart templates, with values serving as parameters to customize those templates. In this section, we will discuss how Helm templates and values function.
Helm charts must contain a templates/
directory that defines the Kubernetes resources to be deployed (although this directory is not strictly required if the chart declares dependencies). The contents under the templates/
directory are YAML files that are made up of Kubernetes resources. The contents of a templates/
directory may appear similar to the following:
templates/   configmap.yaml   deployment.yaml   service.yaml
The configmap.yaml
resource may then look as follows:
apiVersion: v1 kind: ConfigMap metadata: Â Â name: {{ .Release.Name }} data: Â Â configuration.txt: |- Â Â Â Â {{ ...