Advanced Kubernetes Part 2: Helm Basics – Packaging & Managing Apps¶
By now you've hand-written Deployments, Services, ConfigMaps, Secrets, etc.
That's great for learning, but in real projects, repeating that YAML for every app (or version) is painful and error-prone.
Helm is Kubernetes' official package manager.
It bundles YAML templates + values into charts, reusable, versioned packages.
You can install, upgrade, rollback, or delete entire apps with one command.
Pizza chain analogy:
- Hand-written YAML = writing a new recipe from scratch every time
- Helm chart = a pre-made recipe book with fill-in-the-blanks (values.yaml)
→ Change sauce type or number of ovens → run helm upgrade → done
Goal for this section¶
Install Helm locally
Deploy nginx using the official Bitnami nginx chart
Customize it (replicas, config)
Upgrade & rollback
See how much easier this is than raw kubectl
Step 1: Install Helm¶
Helm is just a client binary, no cluster-side component.
Verify:
→ You should see something like version.BuildInfo{Version:"v3.16.x"...}
Step 2: Add a chart repository¶
Helm charts are hosted in repos (like Docker Hub for images).
Add the popular Bitnami repo (lots of high-quality charts):
Search for nginx:
→ You'll see bitnami/nginx (official, well-maintained)
Step 3: Install nginx via Helm¶
Run:
What this does:
- Installs the chart named my-nginx
- Overrides defaults: 3 replicas, NodePort service
- Helm creates Deployment, Service, ConfigMap, etc. automatically
Check:
→ See the 3 Pods, Service, and Helm release.
Open in browser:
→ Welcome to nginx!
Step 4: Customize with values.yaml (real power)¶
Create a file custom-values.yaml:
replicaCount: 5
image:
tag: "1.25" # pin version
service:
type: NodePort
nodePorts:
http: 30080 # fixed port (optional)
ingress:
enabled: true
hostname: nginx.local
path: /
Upgrade the release:
→ Replicas → 5, Ingress created (if you enabled Ingress addon earlier), port fixed
Check:
Step 5: Rollback if something breaks¶
Simulate a bad change : set wrong image tag:
Pods will fail (ImagePullBackOff).
Rollback to previous revision:
→ Back to working state instantly.
Step 6: Cleanup¶
Uninstall the chart:
→ Deletes all resources created by the chart (Deployment, Service, etc.)
Key Takeaways¶
- Helm = templated, reusable YAML + one-command install/upgrade/rollback
- Charts = pre-packaged apps (bitnami/nginx, bitnami/postgresql, wordpress, etc.)
- values.yaml = your customizations (replicas, images, config, ingress…)
- helm repo + search → discover charts
- Production: Use Helmfile, Helmfile + GitOps, or ChartMuseum for private charts
This is a game-changer for managing complexity, most advanced Kubernetes users rely on Helm daily.
→ Next: Part 3 – Resource Limits, Requests & Horizontal Pod Autoscaler (HPA)