Helm
The package manager for Kubernetes — simplify deployments with reusable charts.
Key Concepts
- Chart — A package of pre-configured K8s resources
- Release — An instance of a chart running in a cluster
- Repository — A collection of charts
- Values — Configuration parameters for customization
Essential Commands
# Add a repository
helm repo add bitnami https://charts.bitnami.com/bitnami
# Search for charts
helm search repo nginx
# Install a chart
helm install my-release bitnami/nginx
# List releases
helm list
# Upgrade a release
helm upgrade my-release bitnami/nginx --set replicaCount=3
# Rollback
helm rollback my-release 1
# Uninstall
helm uninstall my-release
Creating Your Own Chart
# Create chart scaffold
helm create my-chart
# Chart structure
my-chart/
Chart.yaml # Chart metadata
values.yaml # Default values
templates/ # K8s manifest templates
deployment.yaml
service.yaml
ingress.yaml
_helpers.tpl # Template helpers
Best Practices
- Use semantic versioning for charts
- Document all values in
values.yaml - Use
_helpers.tplfor reusable template logic - Test charts with
helm lintandhelm template - Store charts in a chart repository (ChartMuseum, OCI)
Learning Resources
Getting Started
| Resource | Description |
|---|---|
| Helm Documentation | Official Helm documentation |
| Create Your First Helm Chart | Bitnami guide on authoring charts |
| Authoring Awesome Charts | Official Helm guide on chart authoring |
| Kompose Guide | Translate docker-compose to Helm |
Chart Repositories
| Repository | Description |
|---|---|
| Helm Hub | Official Helm Hub |
| Bitnami Charts | Popular application charts |
| Kubeapps | Helm chart discovery hub |
| ChartCenter | Central Helm chart repository by JFrog |
| Cloudsmith | Managed package repository with free tier |
| Fairwinds Charts | Fairwinds chart hub |
Helm Plugins
| Plugin | Description |
|---|---|
| Helm Diff | Show diff of helm upgrade/rollback |
| Helm Secrets | Manage secrets safely |
| Helm S3 | Fetch charts from S3 |
| Helm GCS | Manage charts on Google Cloud Storage |
| Helm Datree | Enforce best practices and policies |
| Helm Schema Gen | Generate values.schema.json |
| Helm Teller | Manage deployment configuration securely |
Helm Tools
| Tool | Description |
|---|---|
| Helmfile | Declarative spec for deploying Helm charts |
| Helmsman | Terraform-like desired state for Helm |
| Reckoner | Simplify multiple Helm releases |
| Monocular | Web UI for searching charts |
| ChartMuseum | Self-hosted Helm chart repository |
| Helmify | Generate Helm charts from K8s YAML |
| Helm Docs | Auto-generate chart documentation |
| werf | CLI tool for CI/CD with extended Helm |
Useful Applications
| Application | Repository |
|---|---|
| GitLab Omnibus | charts.gitlab.io |
| JupyterHub | jupyterhub.github.io/helm-chart |
| Harbor Registry | github.com/goharbor/harbor-helm |
| OpenStack | github.com/openstack/openstack-helm |
| Elasticsearch/Kibana | github.com/elastic/helm-charts |
| Kafka | github.com/Landoop/kafka-helm-charts |
Community
| Channel | Link |
|---|---|
| Slack | #helm-users on K8s Slack |
| Stack Overflow | kubernetes-helm tag |
Hook Lifecycle
Helm provides hooks to intervene at specific lifecycle points:
| Hook | Timing |
|---|---|
| pre-install | After templates render, before resources created |
| post-install | After all resources loaded into Kubernetes |
| pre-delete | Before deletion request resources deleted |
| post-delete | After release resources deleted |
| pre-upgrade | After templates render, before update |
| post-upgrade | After resources upgraded |
| pre-rollback | After templates render, before rollback |
| post-rollback | After resources modified |
| test | When Helm test subcommand invoked |