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 DevOps Bootcamp lesson on CoddyKit. This is lesson 4 of 4. Any 3 lessons of this learning path are free to read in full — after that, CoddyKit PRO unlocks every lesson, plus hands-on practice with a built-in code editor and a 24/7 AI tutor. It is part of the DevOps Bootcamp learning path, and your progress syncs across the web and the CoddyKit app. The DevOps Bootcamp course includes 4 lessons in total.
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. ✅
Learn DevOps Bootcamp with an AI tutor — free
Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.
- Courses
- 142
- Lessons
- 568
Frequently Asked Questions
Is the “Default values.yaml and the _helpers File” lesson free?
Yes — any 3 lessons of the DevOps Bootcamp learning path, including “Default values.yaml and the _helpers File”, are free to read in full here on the web. After that, CoddyKit PRO unlocks every lesson, plus interactive practice with a built-in code editor and a 24/7 AI tutor. The DevOps Bootcamp course includes 4 lessons in total.
What will I learn in “Default values.yaml and the _helpers File”?
The two files you will edit most often. You practise DevOps Bootcamp 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 DevOps Bootcamp?
No prior experience is required. DevOps Bootcamp on CoddyKit is structured for beginners through advanced learners, so you can start here or from the beginning and move at your own pace. This is lesson 4 of 4.
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 DevOps Bootcamp lesson?
Yes. Every DevOps Bootcamp 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