Helm — Package Management for Kubernetes
Kubernetes Intermediate/Advanced
Chapter 3 · Helm — Package Management for Kubernetes
Every chapter so far has piled up more raw YAML — StatefulSets, DaemonSets, Jobs, RBAC objects. This chapter covers the tool that manages all of that at real scale: Helm.
The Problem With Raw YAML at Scale
k8s1-12's capstone alone needed roughly eight separate YAML resources — a namespace, ConfigMap, Secret, three Deployments, three Services, an Ingress, a PVC. Manually managing, versioning, and deploying dozens of interrelated YAML files for a real application becomes genuinely unwieldy. Worse: what if the same application needs deploying to dev, staging, and prod with slightly different values — replica counts, resource limits, image tags? Raw YAML has no built-in templating — that means separate, near-duplicate files per environment, or external tooling.
What Helm Actually Is
A package manager for Kubernetes — conceptually similar to apt/npm/pip, but for Kubernetes applications. A chart is a Helm package: a collection of templated YAML manifests plus metadata. Installing a chart with specific configuration values produces a release — a named, tracked deployment of that chart into a cluster.
Chart Structure, Explained
templates/ is filled in with values from values.yaml, and the RESULT is identical in shape to everything Course 1 already taught. Helm doesn't replace that knowledge — it generates it programmatically.
Templating — Turning the Capstone Into a Chart
A fragment of k8s1-12's own Deployment YAML, templated:
A separate values-prod.yaml overriding just replicaCount: 10 and a different tag lets the exact same chart deploy meaningfully different dev and prod configurations — directly solving the "raw YAML per environment" problem from the intro.
Helm Commands — The Basic Workflow
helm install <release-name> <chart>— deploy a new release.helm upgrade— apply changes to an existing release, often triggeringk8s1-5's own rolling-update mechanism underneath.helm rollback— revert to a previous release revision, a direct parallel tok8s1-5'skubectl rollout undo, tracked at the whole-chart/release level instead of a single Deployment.helm uninstall— remove a release and everything it created.
Helm Repositories
Charts can be packaged and shared via repositories, conceptually similar to a package registry. Many popular applications — databases, monitoring stacks — already have official or community Helm charts available, meaning common infrastructure components often don't need to be written from scratch at all — a genuinely practical, time-saving point.
When Helm Is Worth the Extra Layer
Honest framing, matching this course's own recurring convention: for a single, simple application with one environment, raw YAML plus kubectl apply (Course 1's own approach) is perfectly fine and arguably simpler to understand. Helm earns its added complexity specifically once there are multiple environments needing different configuration, or a genuinely complex multi-resource application worth packaging and reusing — exactly the "8 YAML files, multiple environments" scenario the intro raised.
Helm & GitOps
Helm charts, being just files, version-control naturally (git1-git3), and are commonly the actual deployment artifact a GitOps pipeline applies — a topic Course 2's own k8s2-9 covers directly.
helm upgrade with only a new, small values file (say, just an updated image tag) — without including previously-set custom values like a production replica count — can reset those OTHER values back to the chart's defaults, unless --reuse-values is used or the full, correct values file(s) are passed every time. A real, common source of "why did my production config just change" incidents.
Hands-On Exercises
Explain what problem Helm's templating specifically solves that raw YAML manifests (Course 1's own approach) cannot solve on their own, using the dev/staging/prod scenario.
📄 View solutionExplain the relationship between a Helm "chart" and a Helm "release." Are they the same thing, and if not, how do they differ?
📄 View solutionA team runs helm upgrade on their production release using only a new, smaller values file that specifies an updated image tag, without including their previously-set custom replica count. Explain what might happen to their replica count as a result, and how this could cause a real incident.
Chapter 3 Quick Reference
- Chart = the package (Chart.yaml + values.yaml + templates/); release = a named, tracked instance of a chart deployed with specific values
- Templated YAML renders down to ordinary Kubernetes manifests — nothing from Course 1 becomes obsolete
- Different values files let the same chart deploy meaningfully different configs per environment
install/upgrade/rollback/uninstall— rollback isrollout undo, tracked at the release level- Repositories provide pre-built charts for common infrastructure — often no need to write YAML from scratch
- Helm earns its complexity with multiple environments or genuinely complex apps — a single simple app is fine with raw YAML
- A partial values file on
helm upgradecan silently reset other config back to defaults — a real incident source - Next chapter: Networking Deep Dive — CNI plugins, Network Policies, a service mesh overview