Helm Explained
Understand how Helm simplifies Kubernetes application deployment, how charts and values work, and how to manage reusable Kubernetes configurations and releases.
Helm is a package manager for Kubernetes that helps developers and DevOps teams package, configure, install, upgrade and manage applications running in Kubernetes clusters. Instead of maintaining many separate YAML files manually, teams can organize Kubernetes resources into reusable Helm charts.
Helm is especially useful when the same application needs to be deployed several times with different configuration. A single chart can define the structure of an application while values control environment-specific settings such as image tags, replica counts, resource limits and service configuration.
Why Helm Exists
Kubernetes resources are normally described using YAML manifests. A small application may only require a Deployment and a Service, but larger applications can contain many related resources. Copying and modifying these manifests for development, staging and production quickly creates duplication and makes configuration changes harder to maintain.
- Package multiple Kubernetes resources together.
- Reuse deployment templates across environments.
- Separate application configuration from resource definitions.
- Install and upgrade applications consistently.
- Keep a history of application releases.
- Roll back releases when necessary.
Helm and Kubernetes
Helm does not replace Kubernetes. Kubernetes is still responsible for running containers, managing resources and maintaining the desired state of the cluster. Helm is a client-side packaging and templating tool that generates Kubernetes manifests and manages their deployment as releases.
| Technology | Role |
|---|---|
| Kubernetes | Runs and manages containerized applications |
| kubectl | Direct command-line interface for Kubernetes |
| Helm | Packages, templates and manages Kubernetes applications |
| Helm chart | Reusable package containing Kubernetes templates |
What Is a Helm Chart?
A Helm chart is a collection of files that describes a Kubernetes application. The chart contains metadata, default configuration and templates for Kubernetes resources.
my-app/
├── Chart.yaml
├── values.yaml
├── templates/
│ ├── deployment.yaml
│ ├── service.yaml
│ ├── configmap.yaml
│ └── ingress.yaml
└── charts/Chart.yaml
Chart.yaml contains metadata about the chart. It identifies the chart and describes information such as its name, version and application version.
apiVersion: v2
name: my-app
description: A Helm chart for my application
type: application
version: 1.0.0
appVersion: "2.4.0"| Field | Purpose |
|---|---|
| apiVersion | Helm chart API version |
| name | Name of the chart |
| description | Description of the chart |
| type | Chart type |
| version | Version of the chart |
| appVersion | Version of the application |
values.yaml
The values.yaml file contains the default configuration for a chart. Templates can read these values through the .Values object. Users can override the defaults during installation or upgrades without modifying the chart itself.
replicaCount: 2
image:
repository: nginx
tag: "1.27"
service:
type: ClusterIP
port: 80Templates
The templates directory contains Kubernetes manifests with Helm template expressions. Instead of hard-coding every configuration value, templates can reference values supplied by the chart or the user.
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-app
spec:
replicas: {{ .Values.replicaCount }}
template:
spec:
containers:
- name: app
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"When Helm renders this template, expressions such as .Values.replicaCount and .Values.image.tag are replaced with their actual values. The resulting output is ordinary Kubernetes YAML.
Helm Values
Values are one of the most important parts of Helm. They allow the same chart to be reused with different configuration without changing its templates.
| Configuration | Development | Production |
|---|---|---|
| Replicas | 1 | 4 |
| Image tag | latest | 2.4.1 |
| Log level | debug | info |
| Resource limits | Lower | Higher |
Overriding Values with --set
Simple values can be overridden directly from the command line using the --set option.
helm install my-app ./my-app
--set replicaCount=3
--set image.tag=2.4.1Using Additional Values Files
For larger configurations, separate values files are usually easier to maintain than many --set arguments. This approach allows the same chart to be used with environment-specific configuration.
helm install my-app ./my-app
--values values-production.yamlreplicaCount: 4
image:
repository: example/my-app
tag: "2.4.1"
service:
type: ClusterIP
port: 8080What Is a Helm Release?
A release is an installed instance of a Helm chart. One chart can be installed multiple times using different release names, namespaces or configuration values.
helm install my-app ./my-appIn this example, my-app is the release name and ./my-app is the chart being installed. The chart describes what should be deployed, while the release represents a specific installation of that chart.
Installing a Chart
The helm install command creates a new release from a chart. The chart can be located in a local directory, downloaded from a repository or retrieved from another supported chart source.
helm install my-app ./my-appInstalling into a Namespace
Helm can install a release into a specific Kubernetes namespace. The --create-namespace option can create the namespace if it does not already exist.
helm install my-app ./my-app
--namespace production
--create-namespaceUpgrading a Release
When an application or its configuration changes, helm upgrade can update an existing release. Helm renders the chart again using the new chart version or values and applies the resulting Kubernetes resources.
helm upgrade my-app ./my-appRolling Back a Release
Helm keeps release revisions, making it possible to return to an earlier revision when an upgrade causes unexpected behavior.
helm rollback my-app 1Viewing Release History
The helm history command displays previous revisions of a release. It can help developers determine which version was deployed before a problematic upgrade.
helm history my-appRendering a Chart Without Installing It
The helm template command renders chart templates locally. It is useful for inspecting generated Kubernetes YAML before applying anything to a cluster.
helm template my-app ./my-appThis is especially useful during development and automated validation because template errors can often be detected before a deployment reaches Kubernetes.
Chart Dependencies
Helm charts can define dependencies on other charts. This allows an application chart to reuse existing packages for components such as databases, caches or other supporting services.
dependencies:
* name: redis
version: "20.0.0"
repository: "[https://example.com/charts"](https://example.com/charts%22)Dependencies should be used carefully because adding large numbers of external charts can make an application's deployment harder to understand and maintain.
Helm Repositories
Helm repositories are locations from which charts can be distributed and downloaded. Organizations can use public repositories for community charts and private repositories for internal applications.
| Chart Source | Typical Use |
|---|---|
| Public repository | Community and third-party applications |
| Private repository | Internal company applications |
| Local chart | Development and testing |
| OCI registry | Modern container-oriented distribution |
Helm Template Functions
Helm templates provide functions that can transform values and control how manifests are generated. Functions can be combined with template expressions to build reusable configuration logic.
metadata:
name: {{ .Values.name | default "my-app" | quote }}In this example, Helm uses a default value when name is not provided and then formats the result as a quoted string.
The _helpers.tpl File
The _helpers.tpl file is commonly used for reusable named templates. It helps avoid repeating resource naming and labeling logic throughout a chart.
{{- define "my-app.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}A helper can then be reused from other templates instead of duplicating the same expression in every Kubernetes resource.
Helm and Kubernetes Labels
Labels and annotations are commonly generated through Helm templates so that related resources share consistent metadata. This is particularly useful for identifying resources belonging to the same release or application.
metadata:
labels:
app.kubernetes.io/name: {{ include "my-app.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}Helm Hooks
Helm hooks allow Kubernetes resources to participate in specific stages of a release lifecycle. For example, a Job can be configured to run before an installation or after an upgrade.
metadata:
annotations:
"helm.sh/hook": pre-installValidating Helm Charts
Charts should be checked before they are deployed. Helm provides commands for linting charts and rendering templates, while Kubernetes validation can identify problems that only become visible when generated resources are submitted to the cluster.
helm lint ./my-app
helm template my-app ./my-appHelm vs Kubernetes YAML
Plain Kubernetes YAML and Helm solve different problems. Static YAML is often simple and easy to inspect, while Helm becomes more useful when resources need reusable templates, configurable values and release management.
| Feature | Kubernetes YAML | Helm |
|---|---|---|
| Static manifests | Yes | Yes |
| Templating | No | Yes |
| Reusable configuration | Limited | Yes |
| Chart packaging | No | Yes |
| Release history | No | Yes |
| Built-in rollback | No | Yes |
When Should You Use Helm?
Helm is most useful when an application has multiple Kubernetes resources, is deployed repeatedly or requires different configuration in different environments. Small applications with a few static manifests may not need Helm at all.
- Deploying the same application to development, staging and production.
- Packaging applications for other teams.
- Managing applications with many Kubernetes resources.
- Maintaining reusable deployment templates.
- Managing versioned application releases.
- Sharing Kubernetes applications through repositories.
When Helm May Be Unnecessary
Helm is not automatically the best choice for every Kubernetes project. If an application consists of a small number of static resources that rarely change, plain YAML may be easier for a team to understand and maintain. Adding a templating system introduces additional concepts that should provide a clear benefit.
Common Helm Mistakes
- Making templates unnecessarily complicated.
- Putting too much application logic into Helm templates.
- Creating values for every possible configuration option.
- Using many --set arguments instead of a values file.
- Skipping chart validation before deployment.
- Duplicating reusable template logic.
- Adding dependencies without understanding their maintenance requirements.
- Using Helm without understanding the Kubernetes resources it generates.
Best Practices
- Keep charts focused on a specific application or component.
- Use clear and meaningful names for values.
- Document important configuration options.
- Use helper templates for repeated naming and labeling logic.
- Prefer values files for complex environment configuration.
- Run helm lint and helm template during development and CI.
- Keep chart versions consistent with your release process.
- Keep generated Kubernetes resources easy to understand.
- Test upgrades and rollbacks before relying on them in production.
Frequently Asked Questions
What is Helm in Kubernetes?
Helm is a package manager and deployment tool for Kubernetes. It uses charts to package, configure, install, upgrade and manage Kubernetes applications.
What is a Helm chart?
A Helm chart is a package containing Kubernetes templates, default values and metadata that describes how an application should be deployed.
What is a Helm release?
A release is a specific installed instance of a Helm chart. The same chart can be installed multiple times using different release names and configuration.
What is values.yaml used for?
values.yaml stores default configuration values that Helm templates can reference. These values can be overridden during installation or upgrades.
Can Helm roll back an application?
Yes. Helm maintains release revisions and provides the helm rollback command for restoring an earlier revision of a release.
Is Helm required to use Kubernetes?
No. Kubernetes can be managed directly with tools such as kubectl and YAML manifests. Helm is an optional tool that adds packaging, templating and release management capabilities.
What is the difference between Chart.yaml and values.yaml?
Chart.yaml contains metadata about the chart, while values.yaml contains default configuration values used by the chart templates.
Helpful Kubernetes Tools
A Helm Values Formatter helps format Helm configuration files, a Helm Values Validator checks Helm values for structural problems, a Kubernetes YAML Generator creates Kubernetes resource manifests, a YAML Formatter keeps configuration files readable, and a YAML Validator helps detect invalid YAML before it is used in Kubernetes workflows.
Conclusion
Helm provides a reusable way to package and configure Kubernetes applications. Charts combine Kubernetes resource templates with configurable values, while releases allow those charts to be installed, upgraded and rolled back in a controlled way. Features such as templating, values files, dependencies and release history make Helm useful for teams managing applications across multiple environments and clusters. The best Helm charts remain focused, predictable and easy to inspect, using templates to reduce repetition without hiding the underlying Kubernetes architecture.