DevOps Bootcamp · Lesson

Supplying a Custom values File with -f

Versioning your configuration in your own YAML.

Lesson 3 of 413 steps

Supplying a Custom values File with -f is a free DevOps Bootcamp lesson on CoddyKit. This is lesson 3 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.

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.yaml

The 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.yaml

Only 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: 8080

Version 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.yaml

A 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.yaml

Watch 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 web

The 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. ✅

Free to start

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 “Supplying a Custom values File with -f” lesson free?

Yes — any 3 lessons of the DevOps Bootcamp learning path, including “Supplying a Custom values File with -f”, 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 “Supplying a Custom values File with -f”?

Versioning your configuration in your own YAML. 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 3 of 4.

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 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

  1. Inspecting Defaults with helm show values
  2. Override on the CLI with --set
  3. Supplying a Custom values File with -f
  4. How --set and -f Are Merged
← Back to DevOps Bootcamp