DevOps Bootcamp · Lesson

Override on the CLI with --set

Quick single-value tweaks at install time.

Lesson 2 of 413 steps

Override on the CLI with --set is a free DevOps Bootcamp lesson on CoddyKit. This is lesson 2 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.

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

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 “Override on the CLI with --set” lesson free?

Yes — any 3 lessons of the DevOps Bootcamp learning path, including “Override on the CLI with --set”, 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 “Override on the CLI with --set”?

Quick single-value tweaks at install time. 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 2 of 4.

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