0Pricing
Helm Academy · Lesson

Override on the CLI with --set

Quick single-value tweaks at install time.

Override on the CLI with --set is a free Helm Academy lesson on CoddyKit — lesson 2 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.

Tweak Without a File

Sometimes you just want to change one knob. The --set flag overrides a single value right on the command line. ⚡

helm install web bitnami/nginx --set replicaCount=3

Key Equals Value

The syntax is simple: a key path, an equals sign, then the value. Helm slots replicaCount straight into the chart's values.

--set replicaCount=3

Reaching Nested Keys

Use a dot to walk into the values tree. Here image.tag targets the tag nested under image.

--set image.tag=1.27.0

Set Several at Once

Separate multiple overrides with commas, or repeat the flag. Both forms feed the same values map.

--set replicaCount=3,image.tag=1.27.0

Indexing into Lists

For an array, put the index in square brackets. This writes to the first item of the ingress.hosts list.

--set ingress.hosts[0].host=example.com

Escaping Special Characters

Dots and commas inside a value have meaning to Helm. Escape them with a backslash so they stay part of the string.

--set nodeSelector."kubernetes\.io/os"=linux

Forcing a String

Numbers and booleans get typed automatically. Use --set-string when you need a value like a version kept as text.

--set-string image.tag=1.27

Reading Values from a File

For a large or secret value, --set-file reads the content from a file instead of typing it inline.

--set-file config.tls=./server.crt

Great for Automation

Because it is one line, --set shines in scripts and CI where injecting a build number or tag must be quick.

helm upgrade web ./chart --set image.tag=$BUILD_TAG

Know Its Limits

For many or deeply nested overrides, long --set strings get unreadable. That is your cue to switch to a values file.

It Wins Over Defaults

Any key you pass with --set replaces the chart's default for that key. Untouched keys keep their original values.

Quick Check

Let us confirm how to reach a nested key with --set.

Recap

Use --set for quick inline overrides with dotted paths, --set-string to keep text, and a values file once it grows. ✅

Frequently asked questions

Is the “Override on the CLI with --set” lesson free?

Yes — the full text of “Override on the CLI with --set” 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 “Override on the CLI with --set”?

Quick single-value tweaks at install time. 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 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Override on the CLI with --set” 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

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