Default values.yaml and the _helpers File
The two files you will edit most often.
Default values.yaml and the _helpers File is a free Helm Academy lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Helm Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
The Two You Touch Most
Of all the scaffolded files, you will edit values.yaml and _helpers.tpl the most. One configures, the other factors out repetition. 🔧
values.yaml Holds Defaults
The values.yaml file is the chart's default configuration. Every knob a user can tweak should have a sensible default here.
replicaCount: 1
image:
repository: nginx
tag: ""Templates Read These Values
Inside templates you reach defaults through the .Values object. Nested keys are accessed with dots.
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}Users Override Defaults
At install time users override any default with --set or a custom file. Your values.yaml is just the baseline.
helm install web ./mychart --set replicaCount=3Meet _helpers.tpl
The _helpers.tpl file holds named templates: reusable snippets of YAML you define once and call from many places.
templates/_helpers.tplDefining a Helper
You declare a partial with define, giving it a name. The block between define and end is the reusable content.
{{- define "mychart.name" -}}
my-web-app
{{- end -}}Calling a Helper
You insert a named template with include, which works inside pipelines so you can format its output cleanly.
name: {{ include "mychart.name" . }}The Fullname Helper
helm create ships a fullname helper that builds a consistent resource name from the release and chart names.
{{- define "mychart.fullname" -}}The Labels Helper
It also ships a labels helper so every resource carries the same standard set of Kubernetes labels.
metadata:
labels:
{{- include "mychart.labels" . | nindent 4 }}Why Helpers Exist
Helpers stop you from repeating the same label block in every file. Change it once and every resource updates together.
Edit These First
When adapting a chart, start in values.yaml for config and _helpers.tpl for naming and labels. Most of your work lives there. 🎯
Quick Check
Let us confirm the role of _helpers.tpl.
Recap
values.yaml supplies defaults templates read via .Values; _helpers.tpl holds reusable partials like fullname and labels. ✅
Frequently asked questions
Is the “Default values.yaml and the _helpers File” lesson free?
Yes — the full text of “Default values.yaml and the _helpers File” is free to read here on the web, and the Helm Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Helm Academy course, upgrade to CoddyKit PRO.
What will I learn in “Default values.yaml and the _helpers File”?
The two files you will edit most often. You practise Helm Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Helm Academy?
No prior experience is required. Helm Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Default values.yaml and the _helpers File” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Helm Academy lesson?
Yes. Every Helm Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Generate a Skeleton with helm create
- Chart.yaml: Metadata and Versions
- The templates Directory and NOTES.txt
- Default values.yaml and the _helpers File