Skip to main content

Helm

Package manager for Kubernetes

The Recipe Book Analogy

Cooking a complex dish:

ApproachOutcome
Without recipe"How much salt? What temperature?" Every attempt is different.
With recipe bookFollow 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:

FilePurpose
Deployment YAMLHow to run the app
Service YAMLNetworking
ConfigMap YAMLConfiguration
Secret YAMLPasswords
Ingress YAMLExternal access
HPA YAMLAuto-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:

Environmentreplicasimage.tag
dev1dev
staging2v1.2.3-rc
prod5v1.2.3

Same template, different values!

Releases

A Release is an installed instance of a chart.

CommandCreates
helm install my-app ./chartRelease "my-app"
helm install my-app-staging ./chart -f staging.yamlRelease "my-app-staging"

Multiple releases from the same chart!


Helm Commands

Core Operations

CommandPurpose
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

CommandPurpose
helm search hub nginxSearch public charts
helm repo add bitnami ...Add a repository
helm listList installed releases
helm history my-appShow 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:

SettingDefault
replicas1
image.taglatest
resources.memory128Mi

Overriding Values

MethodUsage
Custom filehelm install my-app ./chart -f production.yaml
Command linehelm install my-app ./chart --set replicas=3
Multiple fileshelm install my-app ./chart -f base.yaml -f prod.yaml

Later files override earlier ones.


Chart Repositories

Public Repositories

SourceContent
Artifact Hub (hub.helm.sh)Thousands of community charts
BitnamiHigh-quality app charts
prometheus-communityMonitoring tools

Private Repositories

Host your own charts:

  • ChartMuseum
  • Harbor
  • AWS S3 + Helm S3 plugin
  • Git repository

Helm vs Raw YAML

AspectRaw YAMLHelm
ReusabilityCopy-pasteTemplates
Environment variationsSeparate filesSame chart, different values
VersioningManualBuilt-in
RollbackManualhelm rollback
DependenciesManualManaged
Learning curveLowerHigher

When to Use Each

ScenarioRecommendation
Simple, single-environment appsRaw YAML
Learning KubernetesRaw YAML
Multiple environmentsHelm
Complex apps with many resourcesHelm
Deploying common softwareHelm

Best Practices

1. Keep Charts in Version Control

Track changes with git. Enable code review for infrastructure.

2. Use Semantic Versioning

FieldPurposeExample
versionChart version1.2.3
appVersionApplication version2.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/nginxhelm 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?

CommandPurpose
helm template ./chartShow generated YAML
helm install --dry-runSimulate without deploying
helm get manifest releaseShow 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!

Leave a Comment

Comments (0)

Be the first to comment on this concept.

Comments are approved automatically.