0Pricing
Helm Academy · Lesson

Targeting a Namespace at Install Time

Using --namespace and --create-namespace cleanly.

Targeting a Namespace at Install Time 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.

Where Does It Land?

Every release lives in a namespace, Kubernetes' way of grouping resources. Choose it at install time to keep environments tidy. 📦

The Default Namespace

Add no flag and Helm installs into the namespace from your kubeconfig context, usually default. Fine for testing, messy for real work.

Pick a Namespace

Tell Helm exactly where to deploy with --namespace, or its short form -n. The release and its objects all land there.

helm install my-web bitnami/nginx --namespace web

It Must Already Exist

By default the target namespace must exist first. If it does not, Helm fails with a not found error before deploying anything.

Create It On the Fly

Skip the manual step with --create-namespace. Helm makes the namespace if missing, then installs into it. One clean command.

helm install my-web bitnami/nginx -n web --create-namespace

Why Namespaces Help

Namespaces isolate teams and environments. Putting dev and prod releases in separate namespaces stops them from clashing or being deleted by accident.

Namespace Sticks to the Release

Helm remembers a release's namespace. Later upgrades and rollbacks of that release target the same place automatically.

Always Pass -n Later

To manage a release in a non-default namespace, repeat -n on list, status, and uninstall, or Helm looks in the wrong place.

helm status my-web -n web

List Per Namespace

helm list is namespace-scoped too. Use -n web to see that namespace, or --all-namespaces to view releases everywhere at once.

helm list -n web

A Tidy Pattern

A common habit: one namespace per app or per environment. It keeps RBAC, quotas, and cleanup simple as your cluster grows.

Combine the Flags

Putting it together: name, chart, --create-namespace, and -n give you a fully isolated, self-creating install in one line. 🎯

helm install my-web bitnami/nginx -n web --create-namespace

Quick Check

You install into a namespace that does not exist yet. What happens?

Recap

Use -n to target a namespace and --create-namespace to make it if missing. The release stays bound to that namespace for life. ✅

Frequently asked questions

Is the “Targeting a Namespace at Install Time” lesson free?

Yes — the full text of “Targeting a Namespace at Install Time” 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 “Targeting a Namespace at Install Time”?

Using --namespace and --create-namespace cleanly. 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 “Targeting a Namespace at Install Time” 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. Deploy nginx with helm install
  2. Naming Releases and Generating Names
  3. Targeting a Namespace at Install Time
  4. Watching the Pods Come Up
← Back to Helm Academy