Introduction to Named Templates
Learn how to use named templates.
We'll cover the following...
Note: An interactive sandbox is located at the end of this lesson.
Named templates
We’ve got a very simple Helm chart with only two Kubernetes resources, Deployment and Service. If we take a closer look at them we would see that even though they’re two different resources, some of their parts are the same.
For instance, they have the same labels
in a metadata
property, as shown below:
Press + to interact
metadata:labels:app.kubernetes.io/name: {{ .Values.app.name }}app.kubernetes.io/version: {{ .Release.Name }}-{{ .Release.Revision }}app: {{ .Values.app.name }}group: {{ .Values.app.group }}
For now, it’s rather a simple one, but that’ll change once we start to add more resources and extend the existing parts. To reduce ...