Helm
In short
Helm is the package manager for Kubernetes: it bundles an app's configuration files into a chart you can install, upgrade and roll back with one command.
What is Helm?
Running even a simple application on Kubernetes takes several YAML files: a Deployment, a Service, a ConfigMap, maybe an Ingress and a Secret. Helm, a graduated project of the Cloud Native Computing Foundation, packages these files together as a chart, so the whole application can be shared and installed as one unit, much as apt or npm install software.
A chart contains templates, which are Kubernetes manifests with placeholders, and a values.yaml file with the default settings. When you install it, Helm fills the templates with the values and sends the result to the cluster. You change settings, such as the number of replicas or the image version, by passing your own values instead of editing the templates.
Each installation is a release with a numbered history. helm upgrade moves a release to a new chart version or new values, and helm rollback returns to an earlier revision if something goes wrong. Public repositories offer ready-made charts for common software such as databases, monitoring tools and ingress controllers.
A common misconception is that Helm runs or schedules applications. Kubernetes does that; Helm only generates and applies the manifests and tracks the releases. Heavy templating can also make charts hard to read, which is why some teams prefer plain manifests with Kustomize or combine Helm with GitOps tools such as Argo CD.
Key takeaways
- Helm is the package manager for Kubernetes.
- A chart bundles templated manifests with default values in values.yaml.
- Each install is a release that can be upgraded and rolled back.
- Public repositories offer charts for common software.
- Kubernetes runs the application; Helm generates and manages its manifests.
Example
# Add a chart repository and install a release called "dashboards"
helm repo add grafana https://grafana.github.io/helm-charts
helm install dashboards grafana/grafana --set replicas=2
# Change a setting later, then go back if needed
helm upgrade dashboards grafana/grafana --set replicas=3
helm rollback dashboards 1Readers ask
What is a Helm chart?
A package of templated Kubernetes manifests plus a values.yaml file of default settings. Installing the chart renders the templates with your values and applies them to the cluster.
Is Helm required for Kubernetes?
No. You can apply plain YAML manifests with kubectl or use Kustomize. Helm becomes useful when you install the same application many times or share it with others.
What is a Helm release?
One installation of a chart in a cluster, with its own name and a history of revisions that can be upgraded or rolled back.
See also
- KubernetesDevOps & Cloud, p. 32Kubernetes is an open-source system that automates deploying, scaling, and managing containerized applications across a cluster of machines.
- PodDevOps & Cloud, p. 41A pod is the smallest deployable unit in Kubernetes: one or more containers that share a network address and storage and are scheduled together on one node.
- ContainerDevOps & Cloud, p. 12A container is a lightweight, isolated package that bundles an application with its dependencies and runs it on the host's shared operating system kernel.
- YAMLDevOps & Cloud, p. 54YAML is a human-readable data format that uses indentation instead of brackets, widely used for configuration files in DevOps tools and CI/CD pipelines.
- GitOpsDevOps & Cloud, p. 23GitOps is a way of managing infrastructure and deployments where Git holds the desired state of a system and an automated agent keeps the live system in sync.
- RollbackDevOps & Cloud, p. 45A rollback is the process of returning software to a previous, known-good version after a new deployment causes errors, outages, or other unexpected problems.
- kubectlDevOps & Cloud, p. 31kubectl is the command-line tool for Kubernetes: it sends requests to a cluster's API server to deploy applications, inspect them and change them.
Spotted a mistake or something missing on this page?Suggest an edit