Kubernetes

It is said that Helm is also Templating Engine. What does it mean?

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

It is useful for scenarios where you have multiple applications and all are similar, so there are minor differences in their configuration files and most values are the same. With Helm you can define a common blueprint for all of them and the values that are not fixed and change can be placeholders. This is called a template file and it looks similar to the following

apiVersion: v1
kind: Pod
metadata:
  name: {[ .Values.name ]}
spec:
  containers:
  - name: {{ .Values.container.name }}
  image: {{ .Values.container.image }}
  port: {{ .Values.container.port }}

The values themselves will in separate file:

name: some-app
container:
  name: some-app-container
  image: some-app-image
  port: 1991