Supplying a Custom values File with -f
Versioning your configuration in your own YAML.
Supplying a Custom values File with -f is a free Helm Academy lesson on CoddyKit — lesson 3 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.
Config as a File
When overrides pile up, put them in your own YAML file. The -f flag hands that file to Helm at install time. 📄
helm install web bitnami/nginx -f my-values.yamlThe Long Form
The flag -f is short for --values. Both do the same thing, so use whichever reads more clearly to you.
helm install web bitnami/nginx --values my-values.yamlOnly What You Change
Your file need not repeat every default. Include just the keys you want to override and Helm merges them over the rest.
replicaCount: 3
image:
tag: "1.27.0"Nested Looks Natural
In a file, nested keys are just indented YAML. This is far easier to read than a long dotted --set string.
service:
type: ClusterIP
port: 8080Version It in Git
A values file is plain text, so you can commit it. Now your deployment config has history and review like any other code.
Stack Multiple Files
Pass -f more than once. Helm reads them left to right, and later files override earlier ones key by key.
helm install web ./chart -f base.yaml -f prod.yamlA Base Plus Overlay Pattern
Keep shared settings in base.yaml and per-environment tweaks in prod.yaml. Stacking them keeps each file small and focused.
# prod.yaml
replicaCount: 5
resources:
limits:
cpu: "1"Reuse on Upgrade
The same -f file works with helm upgrade. Edit the file, run upgrade, and your release picks up the new values.
helm upgrade web ./chart -f my-values.yamlWatch the Indentation
YAML cares about spaces, not tabs. A misaligned key silently lands in the wrong place, so keep your indentation consistent.
Confirm What Took Effect
After installing, run helm get values on the release to see exactly which overrides Helm recorded.
helm get values webThe Go-To for Real Work
For anything beyond a quick test, a values file is the maintainable choice. It keeps your configuration readable and shareable.
Quick Check
Let us confirm what happens when you pass -f twice.
Recap
Use -f to supply your own values YAML, include only what changes, stack files for overlays, and commit them to Git. ✅
Frequently asked questions
Is the “Supplying a Custom values File with -f” lesson free?
Yes — the full text of “Supplying a Custom values File with -f” 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 “Supplying a Custom values File with -f”?
Versioning your configuration in your own YAML. 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 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Supplying a Custom values File with -f” 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
- Inspecting Defaults with helm show values
- Override on the CLI with --set
- Supplying a Custom values File with -f
- How --set and -f Are Merged