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 (classic index) and search it
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm search repo prometheus-community
# Search Artifact Hub from the CLI
helm search hub podinfo
# Install a chart straight from an OCI registry (Helm 3.8+ / Helm 4)
helm install my-release oci://ghcr.io/stefanprodan/charts/podinfo
# List releases
helm list
# Upgrade a release
helm upgrade my-release oci://ghcr.io/stefanprodan/charts/podinfo --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 |
| Chart Template Guide | Official walkthrough for authoring your first chart |
| Chart Best Practices | Official conventions for values, templates and dependencies |
| Kompose Guide | Translate docker-compose to Helm |
Chart Repositoriesโ
| Repository | Description |
|---|---|
| Artifact Hub | CNCF-hosted search across public Helm repositories and OCI registries |
| prometheus-community | Prometheus, Alertmanager, kube-prometheus-stack |
| Grafana Charts | Grafana, Loki, Tempo, Mimir |
| Cloudsmith | Managed package repository with free tier |
| Fairwinds Charts | Polaris, Goldilocks, RBAC Manager |
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 Schema Gen | Generate values.schema.json |
Helm Toolsโ
| Tool | Description |
|---|---|
| Helmfile | Declarative spec for deploying Helm charts |
| Helmsman | Terraform-like desired state for Helm |
| Reckoner | Simplify multiple Helm releases |
| 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 |