Learning PathsHelm
HelmChapter 1·BEGINNER·10 min read

Why Helm Exists & Core Concepts

The problem Helm solves for Kubernetes deployments, the three core concepts (charts, releases, repositories), and how Helm compares to raw kubectl apply and Kustomize.

Prerequisites
  • Comfortable with core Kubernetes objects (Deployments, Services, ConfigMaps)
  • Basic kubectl usage
You'll learn to
  • Explain what problem Helm solves that raw YAML manifests don't
  • Define chart, release, and repository precisely and distinguish them
  • Compare Helm to plain kubectl apply and to Kustomize
  • Install Helm and add a first repository

Why Helm Exists & Core Concepts

1. Why does this exist?

Imagine your team runs 12 microservices, each needing a Deployment, a Service, a ConfigMap, and an Ingress rule. Early on, you write 12 sets of near-identical YAML files, copy-pasted from the first one, with small differences: a different image tag, a different replica count, a couple of environment variables. It works — until you need to add a standard liveness probe to all 12 services. Now you’re hand-editing 12 separate Deployment YAMLs, hoping you don’t typo one of them.

Helm exists to collapse “12 near-identical YAML directories” into “1 reusable template + 12 small configuration files.” You write the Kubernetes manifest logic once, as a chart, and supply the differences — image tag, replica count, environment variables — as values. A shared fix to the template applies everywhere the next time each service is upgraded, instead of needing to be repeated by hand across every copy.

2. Concept

Three Core Concepts

Concept What It Is Analogy
Chart A packaged, versioned bundle of Kubernetes YAML templates plus a schema for their inputs Like a class definition, or a software package (an .rpm/.deb, or an npm package)
Release A specific, named installation of a chart into a cluster, with a specific set of values Like an instantiated object from that class — one chart, installed twice with different values, is two releases
Repository A collection of packaged, versioned charts, indexed and fetchable over HTTP (or OCI registries) Like npm’s registry or a Debian package repository

Advantages: templating removes copy-paste duplication; versioned charts + releases give you helm upgrade/helm rollback as first-class operations; a healthy public chart ecosystem (Bitnami, official project charts) means common software (Postgres, Redis, Prometheus) often doesn’t need custom manifests written at all.

Disadvantages: templating YAML-in-YAML (Go templates producing YAML output) has a real learning curve and can produce confusing errors; charts add an abstraction layer between you and the raw manifests, which can obscure exactly what’s being applied if you’re not in the habit of checking helm template output.

Helm vs kubectl vs Kustomize

Raw kubectl apply Kustomize Helm
Customization mechanism None — edit YAML directly Patch-based overlays on valid YAML Go-template variables and control flow
Templating syntax None None (deliberately) Yes — loops, conditionals, functions
Packaging/versioning None None Charts have versions; releases are tracked
Rollback Manual (kubectl apply an old file) Manual helm rollback to any prior release revision
Learning curve Lowest Low-medium Medium — templating adds real complexity
Best fit Tiny, static, rarely-changing manifests Teams who want zero templating, pure YAML overlays Reusable, parameterized, versioned application packaging

3. Architecture Diagram

flowchart LR
    Repo[(Chart Repository)] -->|helm repo add / helm pull| Local[Local Chart Cache]
    Local -->|helm install| Release1[Release: myapp-staging]
    Local -->|helm install| Release2[Release: myapp-prod]
    Release1 --> K8s1[Kubernetes objects in staging namespace]
    Release2 --> K8s2[Kubernetes objects in prod namespace]

One chart, pulled once, becomes two independent releases — each with its own values, its own revision history, and its own lifecycle (upgrade, rollback, uninstall) without touching the other.

4. Visual Explanation

From Chart + Values to Applied Manifests

Chart templates (Go template syntax)  +  values.yaml (your inputs)


          helm template / helm install


       Plain, rendered Kubernetes YAML


          Applied to the cluster via the Kubernetes API
Hint: how do I see exactly what YAML a chart will produce, without installing anything?

helm template <release-name> <chart> -f values.yaml renders the chart locally and prints the resulting plain YAML — no cluster contact at all. This is the single most useful command for understanding what a chart actually does before trusting it.

5. Example

# Install Helm (macOS)
brew install helm

# Add a chart repository
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update

# Search for a chart
helm search repo bitnami/nginx

# Install it as a named release
helm install my-nginx bitnami/nginx --namespace web --create-namespace

# See what's installed
helm list --namespace web

my-nginx is now a tracked release — helm upgrade my-nginx bitnami/nginx --set replicaCount=3 changes it, helm rollback my-nginx 1 reverts to its first revision, and helm uninstall my-nginx removes everything it created.

6. Production Example

A typical internal chart repository layout for a platform team:

helm-charts/
├── charts/
│   ├── microservice/          # shared, generic chart used by most services
│   │   ├── Chart.yaml
│   │   ├── values.yaml
│   │   └── templates/
│   └── postgres-app/          # a more specialized chart wrapping Bitnami's postgresql chart
├── environments/
│   ├── staging/
│   │   └── myapp-values.yaml
│   └── prod/
│       └── myapp-values.yaml

One microservice chart, reused by every team’s service, with per-environment values files supplying just the differences — this is the direct Helm equivalent of the “one Terraform module, many environments” pattern from the Terraform course.

7. Code Walkthrough — Chart.yaml Anatomy

# Chart.yaml
apiVersion: v2
name: microservice
description: Generic microservice chart used across the platform
version: 1.4.0        # the CHART's own version — bump on every template change
appVersion: "2.3.1"   # the version of the application this chart deploys, informational only

version and appVersion are frequently confused: version tracks the chart’s own template changes (bump this when you edit templates/), while appVersion is just a label describing which version of the actual application the chart currently deploys — Helm never uses appVersion to make decisions, it’s documentation for humans.

8. Behind the Scenes

When you run helm install, Helm does the following, entirely client-side except the final step: loads the chart’s templates and your supplied values, merges values according to a strict precedence order (chart defaults → parent chart values → -f files → --set flags, highest wins), renders every template through Go’s templating engine to produce plain YAML, then submits that rendered YAML to the Kubernetes API — the same way kubectl apply would. Helm also writes a release record (as a Kubernetes Secret, by default, in the release’s namespace) capturing the rendered manifest and metadata for that revision, which is what makes helm rollback possible: it’s not magic, it’s just re-applying a previous revision’s stored rendered manifest.

9. Common Mistakes

  • Wrong: Treating a chart as a black box and never running helm template to inspect its actual output before installing into production. Why: charts can contain surprising defaults (unexpected resource requests, a LoadBalancer service type you didn’t want exposed). Correct: always helm template (or helm install --dry-run) unfamiliar charts first.
  • Wrong: Confusing a chart’s version with its appVersion when deciding whether an upgrade is available. Why: appVersion is purely informational — checking it doesn’t tell you anything about whether the chart’s actual templates have changed. Correct: track version for chart template changes, appVersion only as a label for which app release is being deployed.
  • Wrong: Installing the same chart into the same namespace under the same release name for two genuinely different purposes, expecting Helm to somehow separate them. Why: release names must be unique per namespace — Helm has no notion of “two releases sharing one name.” Correct: use distinct, meaningful release names (myapp-staging, myapp-canary) or separate namespaces.

10. Production Tips

  • 🚀 Best Practice: Run helm template in CI on every chart change and diff the output against the previous commit’s rendered YAML — this catches unintended changes before they reach a cluster.
  • 💡 Tip: Pin chart versions explicitly (helm install myapp bitnami/nginx --version 15.3.2) instead of always pulling latest — an upstream chart bump can change defaults you depend on.
  • ⚠️ Warning: Public charts (Bitnami, community charts) change maintainers and defaults over time — read the chart’s changelog before any version bump, the same discipline you’d apply to a Terraform provider upgrade.

11. Debugging

Symptom Likely Cause Fix
Error: INSTALLATION FAILED: cannot re-use a name that is still in use A release with that name already exists in this namespace Use helm list to check, helm upgrade instead of install if you meant to update it, or pick a new name
Rendered YAML looks nothing like what you expected A values override higher in the precedence chain (--set, a values file) is silently winning Run helm get values <release> to see the actual merged values Helm used for that release
Error: YAML parse error during install A template produced invalid YAML — often an indentation or missing-quote issue in the Go template itself Run helm template locally first, isolate the exact template file from the error line number

12. Interview Questions

Q — Explain, in your own words, what a Helm chart, release, and repository each are, and how they relate. A chart is the packaged, versioned template — the reusable definition. A release is one specific installation of a chart into a cluster with a specific set of values — the same chart can produce many independent releases. A repository is where charts are published and fetched from, analogous to a package registry. The relationship: repository → chart → (n) releases.

Q — When would you choose Kustomize over Helm, or vice versa? Kustomize fits teams that want zero templating syntax — pure, valid YAML with patch-based overlays, which some teams prefer for auditability and lower learning curve. Helm fits when you need genuine reuse across many parameterized deployments, versioned packaging, and rollback as a first-class operation — especially when consuming third-party charts (Postgres, Redis) where you don’t want to hand-maintain the underlying manifests yourself.

13. Hands-on Lab

Goal: install Helm, add a repository, and inspect a chart’s rendered output without installing anything into a real cluster.

  1. Install Helm and run helm repo add bitnami https://charts.bitnami.com/bitnami && helm repo update.
  2. Run helm show values bitnami/nginx | head -40 to see the chart’s default, overridable inputs.
  3. Run helm template my-nginx bitnami/nginx --set service.type=ClusterIP > rendered.yaml and open rendered.yaml.
  4. Identify which values from step 2’s defaults ended up unchanged in the rendered output, and which one you overrode.
Solution

This is the safe, no-cluster-required way to build intuition for how values flow through a chart's templates into final YAML — the exact same rendering `helm install` performs, just without submitting anything to a cluster.

14. Mini Project

Package a simple app as your first chart. Using helm create mychart (which scaffolds a starter chart):

  1. Replace the scaffolded Deployment template with one deploying a simple nginx:latest image.
  2. Add a replicaCount value in values.yaml, referenced in the Deployment template.
  3. Run helm template mychart --set replicaCount=3 and confirm the rendered output shows 3 replicas.
  4. Install it into a local cluster (minikube/kind) as a release named demo, then helm upgrade demo ./mychart --set replicaCount=5, and confirm the running Deployment scales accordingly.

16. Summary

  • Helm packages parameterized Kubernetes manifests into reusable charts, deployed as independently-tracked releases.
  • Chart = reusable template; release = one tracked installation of that template with specific values; repository = where charts are published/fetched.
  • Helm’s templating (Go templates) trades a real learning curve for genuine reuse and rollback, versus Kustomize’s zero-templating patch overlays.
  • helm template/helm install --dry-run are the safe way to inspect exactly what a chart will produce before trusting it in a real cluster.

17. Cheat Sheet

helm repo add <name> <url>
helm repo update
helm search repo <term>
helm install <release-name> <chart> -f values.yaml
helm template <release-name> <chart> -f values.yaml
helm upgrade <release-name> <chart> --set key=value
helm rollback <release-name> <revision>
helm list
helm get values <release-name>
helm uninstall <release-name>

Next chapter covers chart templating in depth — the Go template syntax, built-in objects (.Values, .Release, .Chart), helper functions, and the _helpers.tpl pattern for shared template snippets.

🔒 Locked
Sign in and unlock the full syllabus to keep reading.
Sign in to continue