The Recipe Book Analogy
Cooking a complex dish:
| Approach | Outcome |
|---|---|
| Without recipe | "How much salt? What temperature?" Every attempt is different. |
| With recipe book | Follow the recipe. Same dish, every time. Share with friends. |
Helm is a recipe book for Kubernetes. It packages all the configuration needed to deploy an application.
Why Helm?
The Kubernetes Problem
Deploying an app to Kubernetes requires many YAML files:
| File | Purpose |
|---|---|
| Deployment YAML | How to run the app |
| Service YAML | Networking |
| ConfigMap YAML | Configuration |
| Secret YAML | Passwords |
| Ingress YAML | External access |
| HPA YAML | Auto-scaling |
5-10+ YAML files per application! Each environment (dev/staging/prod) needs tweaks.
Helm's Solution
helm install my-app ./my-chart
One command. Everything deployed.
Same chart, different values for each environment.
Helm Concepts
Charts
A Chart is a package of Kubernetes resources:
my-app-chart/
├── Chart.yaml ← Metadata (name, version)
├── values.yaml ← Default configuration
├── templates/ ← Kubernetes YAML templates
│ ├── deployment.yaml
│ ├── service.yaml
│ └── ingress.yaml
└── charts/ ← Dependencies
Templates and Values
Templates have placeholders filled at deploy time:
| Environment | replicas | image.tag |
|---|---|---|
| dev | 1 | dev |
| staging | 2 | v1.2.3-rc |
| prod | 5 | v1.2.3 |
Same template, different values!
Releases
A Release is an installed instance of a chart.
| Command | Creates |
|---|---|
helm install my-app ./chart | Release "my-app" |
helm install my-app-staging ./chart -f staging.yaml | Release "my-app-staging" |
Multiple releases from the same chart!
Helm Commands
Core Operations
| Command | Purpose |
|---|---|
helm install [name] [chart] | Deploy application |
helm upgrade [name] [chart] | Update to new version |
helm rollback [name] [revision] | Go back to previous |
helm uninstall [name] | Remove everything |
Discovery
| Command | Purpose |
|---|---|
helm search hub nginx | Search public charts |
helm repo add bitnami ... | Add a repository |
helm list | List installed releases |
helm history my-app | Show release history |
The Workflow
1. FIND or CREATE a chart
↓
2. CUSTOMIZE with values file
↓
3. INSTALL to cluster
↓
4. UPGRADE when needed
↓
5. ROLLBACK if problems
Values and Overrides
Default Values (values.yaml)
Charts include sensible defaults:
| Setting | Default |
|---|---|
| replicas | 1 |
| image.tag | latest |
| resources.memory | 128Mi |
Overriding Values
| Method | Usage |
|---|---|
| Custom file | helm install my-app ./chart -f production.yaml |
| Command line | helm install my-app ./chart --set replicas=3 |
| Multiple files | helm install my-app ./chart -f base.yaml -f prod.yaml |
Later files override earlier ones.
Chart Repositories
Public Repositories
| Source | Content |
|---|---|
| Artifact Hub (hub.helm.sh) | Thousands of community charts |
| Bitnami | High-quality app charts |
| prometheus-community | Monitoring tools |
Private Repositories
Host your own charts:
- ChartMuseum
- Harbor
- AWS S3 + Helm S3 plugin
- Git repository
Helm vs Raw YAML
| Aspect | Raw YAML | Helm |
|---|---|---|
| Reusability | Copy-paste | Templates |
| Environment variations | Separate files | Same chart, different values |
| Versioning | Manual | Built-in |
| Rollback | Manual | helm rollback |
| Dependencies | Manual | Managed |
| Learning curve | Lower | Higher |
When to Use Each
| Scenario | Recommendation |
|---|---|
| Simple, single-environment apps | Raw YAML |
| Learning Kubernetes | Raw YAML |
| Multiple environments | Helm |
| Complex apps with many resources | Helm |
| Deploying common software | Helm |
Best Practices
1. Keep Charts in Version Control
Track changes with git. Enable code review for infrastructure.
2. Use Semantic Versioning
| Field | Purpose | Example |
|---|---|---|
| version | Chart version | 1.2.3 |
| appVersion | Application version | 2.0.0 |
3. Document Your Values
Add comments explaining what each value does and expected values for different environments.
4. Pin Chart Versions
| ❌ Bad | ✅ Good |
|---|---|
helm install my-app bitnami/nginx | helm install my-app bitnami/nginx --version 15.0.0 |
Common Mistakes
1. Not Pinning Versions
Unpinned charts can change unexpectedly. Specify a version.
2. Secrets in values.yaml
Do not commit secrets to git. Use:
- External secret managers
- Encrypted secrets
- Environment variables
3. Huge Values Files
Only include what changes per environment. Use chart defaults for common settings.
FAQ
Q: Helm 2 vs Helm 3?
Helm 3 removed Tiller (the server component). Generally simpler. Prefer Helm 3.
Q: Helm vs Kustomize?
Helm: templating with values Kustomize: patching base resources Both work! Some teams use both.
Q: How do I debug Helm?
| Command | Purpose |
|---|---|
helm template ./chart | Show generated YAML |
helm install --dry-run | Simulate without deploying |
helm get manifest release | Show deployed resources |
Q: Can I use Helm with GitOps?
Yes! ArgoCD and Flux support Helm charts natively.
Summary
Helm packages Kubernetes applications into reusable, configurable charts.
Key Takeaways:
- Charts = packaged Kubernetes applications
- Templates + values = customizable deployments
- One chart serves multiple environments
- Built-in versioning and rollback
- Public repos have thousands of charts
- Pin versions for reproducibility
- Keep charts in version control
Helm makes Kubernetes deployments manageable and repeatable!
Related Concepts
Leave a Comment
Comments (0)
Be the first to comment on this concept.
Comments are approved automatically.