Helm

Helm is a package manager and templating engine for #Kubernetes’s YAML bundles, or Helm Charts.

Directory Structure

mychart/
  Chart.yaml
  values.yaml
  charts/
  templates/
  • Chart.yaml store the Helm Chart’s metadata.
  • values.yaml see #Templating
  • charts/ store the chart’s dependencies
  • templates/ store template files

Templating

YAML files could import values from other YAML file by using the syntax {{ }}.

# values.yaml
name: my-app
container:
  name: my-app-container
  image: my-app-img
  port: 9001
# template YAML
metadata:
  name: {{ .Values.name }}
spec:
  containers:
  - name: {{ .Values.container.name }}
    image: {{ .Values.container.image }}
    port: {{ .Values.container.port }}

Note: the value could be overriden by using the option --values={file} or --set {value}

Links to this page
#container #Templating