26.4c Helm: the package manager for Kubernetes — charts, values, and releases¶
🧭 Context Introduction¶
When working with Kubernetes, engineers quickly realize that deploying applications involves many YAML files — deployments, services, config maps, secrets, and more. Managing all these files manually becomes messy and error-prone, especially when you need to deploy the same application across multiple environments (development, staging, production) or update configurations frequently.
Helm solves this problem. Think of Helm as the "apt-get" or "yum" for Kubernetes. It packages all the Kubernetes resources needed for an application into a single, reusable unit called a chart. With Helm, you can install, upgrade, roll back, and manage complex Kubernetes applications with simple commands — no more copying and pasting YAML files.
🎯 What is Helm?¶
Helm is the official package manager for Kubernetes. It helps engineers:
- Package Kubernetes applications into reusable templates (charts)
- Install complex applications with a single command
- Upgrade applications without downtime
- Roll back to previous versions if something goes wrong
- Manage dependencies between different application components
📦 Core Concepts: Charts, Values, and Releases¶
Helm introduces three fundamental concepts that work together:
🗂️ Charts — The Application Package¶
A chart is a collection of files that describe a set of Kubernetes resources. It's like a recipe for deploying an application.
What a chart contains:
- Chart.yaml — Metadata about the chart (name, version, description)
- templates/ — Directory containing Kubernetes YAML templates (with placeholders)
- values.yaml — Default configuration values for the templates
- charts/ — Directory for sub-charts (dependencies)
- README.md — Documentation for the chart
Example chart structure:
my-app/
├── Chart.yaml
├── values.yaml
├── templates/
│ ├── deployment.yaml
│ ├── service.yaml
│ └── _helpers.tpl
└── charts/
⚙️ Values — The Configuration Variables¶
Values are the configuration parameters that customize how a chart behaves. Instead of hardcoding values in your YAML files, you use placeholders (like {{ .Values.replicaCount }}) in the templates. When you install or upgrade a chart, you provide the actual values.
Key points about values:
- Default values are stored in values.yaml inside the chart
- You can override defaults using custom values files or command-line parameters
- Values make charts reusable across different environments
- Common values include: replica counts, image tags, resource limits, and environment variables
Example of what values look like:
For reference:
# values.yaml
replicaCount: 3
image:
repository: nginx
tag: "1.25"
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 80
resources:
limits:
cpu: 500m
memory: 512Mi
🚀 Releases — The Running Instances¶
A release is a running instance of a chart in a Kubernetes cluster. When you install a chart, Helm creates a release with a unique name. This allows you to:
- Track different versions of the same application
- Roll back to previous releases
- Upgrade specific releases independently
- Delete releases cleanly
Example: You can have two releases of the same chart: - my-app-prod — Production version with 10 replicas - my-app-dev — Development version with 1 replica
📊 Comparison: Without Helm vs. With Helm¶
| Aspect | Without Helm | With Helm |
|---|---|---|
| Deployment | Manually create 5+ YAML files | One command to install a chart |
| Updates | Edit YAML files manually | Change values and upgrade |
| Rollbacks | Manually restore old YAML files | One command to roll back |
| Reusability | Copy-paste YAML across environments | Same chart, different values |
| Dependencies | Manually install each component | Charts can include dependencies |
| Versioning | No built-in version tracking | Every release is versioned |
📊 Visual Representation: Helm Package Manager Template Rendering¶
This diagram displays Helm template processing: rendering variable definitions from values.yaml directly into YAML manifests.
🛠️ How Helm Works in Practice¶
The Workflow¶
- Find a chart — From Helm's public repository (Artifact Hub) or create your own
- Customize values — Create a values file for your specific environment
- Install the chart — Helm reads the chart, substitutes values into templates, and applies the resulting YAML to your cluster
- Manage releases — Upgrade, roll back, or delete releases as needed
Common Use Cases for Engineers¶
- Deploying NVIDIA GPU Operator — Install and manage GPU drivers, device plugins, and monitoring across your cluster
- Deploying monitoring stacks — Install Prometheus, Grafana, and exporters for GPU metrics
- Deploying AI workloads — Package your training jobs or inference services as charts
- Managing environment configurations — Use different values files for dev, staging, and production
🔄 Helm vs. kubectl¶
While kubectl applies raw YAML files directly to the cluster, Helm adds a layer of abstraction:
| Feature | kubectl | Helm |
|---|---|---|
| YAML management | Manual file management | Template-based with variables |
| Updates | Manual edits | Automated upgrades with diff |
| Rollback | Manual restore | Built-in rollback to any revision |
| Sharing | Share YAML files | Share charts via repositories |
| Complexity | Simple for small apps | Better for complex, multi-resource apps |
🧩 Real-World Example: Deploying an Application¶
Imagine you want to deploy a web application with a database. Without Helm, you would create:
- A Deployment YAML for the web app
- A Service YAML for the web app
- A ConfigMap YAML for configuration
- A StatefulSet YAML for the database
- A PersistentVolumeClaim YAML for storage
- A Secret YAML for passwords
With Helm, you use a single chart that contains all these templates. You just provide a values file with your specific settings (like database size, number of replicas, and image tags). Helm handles the rest.
✅ Key Takeaways for New Engineers¶
- Helm = Package Manager for Kubernetes — It simplifies deploying, upgrading, and managing complex applications
- Charts are reusable application packages containing templates and default values
- Values let you customize deployments without modifying templates
- Releases track each installation and allow rollbacks
- Helm works on top of kubectl — It generates YAML and applies it to the cluster
- Start with existing charts — Use charts from Artifact Hub before creating your own
- Always version your charts — Use semantic versioning (e.g., 1.2.3) for tracking changes
📚 Next Steps for Learning¶
- Explore Artifact Hub — Search for charts like nginx, prometheus, or nvidia-gpu-operator
- Practice with simple charts — Install a basic chart, customize values, and upgrade it
- Create a simple chart — Package a single deployment and service into your own chart
- Learn about Helm repositories — Understand how to host and share charts with your team
💡 Remember: Helm is not a replacement for understanding Kubernetes resources. It's a tool that makes managing those resources easier. Always understand what YAML Helm is generating for you — especially when working with GPU workloads and NVIDIA-specific configurations.