Overview
Application development in Kubernetes is inherently complex. For any given application, you might be installing, managing, and updating hundreds of configurations.
Helm simplifies this process by automating the distribution of your applications using a packaging format called a Helm chart. Much like how yum
manages RPM packages for Red Hat® Enterprise Linux®, helm
manages Helm charts for Kubernetes. Charts maintain consistency across containers while also determining how specific requirements for an application are met.
As the package manager for Kubernetes, Helm enables you to apply the same configuration framework to multiple instances using variable overrides, all based on what matters most to your specific configuration.
Fun fact: Helm is an open-source project that graduated out of the Cloud Native Computing Foundation (CNCF). It was first introduced in 2015 at the inaugural KubeCon and migrated to the CNCF with Kubernetes.
How does Helm work?
Helm works by describing the application from definition to upgrade in what is known as a Helm chart. Helm uses charts (similar to a template) to pass resources to your Kubernetes cluster using the Kubernetes API.
Helm uses a single command line interface (CLI) tool called helm
to manage the Helm chart, along with a handful of simple commands that allow you to create, manage, and configure your application.
Red Hat resources
What is a Helm chart?
Helm charts are a collection of files that describe a Kubernetes cluster’s resources and package them together as an application. They comprise three basic components:
- The chart -
Chart.yaml
defines the application metadata like name, version, dependencies, etc. - Values -
values.yaml
sets values, which is how you will set variable substitutions for reusing your chart- You may also have a values JSON schema that describes a structure for the values file, which can help in creating dynamic forms and validating your values parameters.
- The templates directory -
templates/
houses your templates and combines them with the values set in your values.yaml file to create manifests - The charts directory -
charts/
stores any chart dependencies you define inChart.yaml
and reconstruct withhelm dependency build
orhelm dependency update
.
Each time you install a Helm chart, you also create an instance of it, called a release. Helm charts are maintained with each new release, and you can easily use previous versions of the chart to roll back to your preferred configuration.
To see Helm charts in action, check out this episode of Ask a Product Manager Office Hours that discusses using Helm with Red Hat OpenShift®.
How to use Helm charts
After installing the Helm CLI, you have two options: use an existing chart with predefined resources and values or create a customized chart to package your own application resources.
Using a pre-existing chart
Using a pre-existing chart involves first adding the Helm repository to your Helm client, then setting specific configuration parameters in your values files at the time of install.
Your values files are the keys to reusing Helm charts for individual configurations. You can substitute any variable declared in values.yaml
, and Helm will create the .values
structure to hold these variables in the template. This makes the variables available to substitute in later configurations. You can pass as many values files to a chart as you want; Helm will combine them and render them together so it’s possible to reuse variable files.
Once you have committed or pushed your values configurations, you will be able to update, upgrade, and manage your application’s lifecycle through common helm
commands.
Creating a customized chart
You may need to create a custom chart to package applications you want to reuse across your organization or within your specific workloads. This involves defining your application’s resources in the chart’s templates/
directory, setting configuration parameters through values files, and adding any metadata and documentation to the Chart.yaml
file.
You can then package the chart using helm package
and upload it to a public or private Helm repository, or distribute it directly.
Red Hat’s validated patterns are useful examples of existing Helm charts that you can also customize. Validated patterns are Helm charts that describe a full workload that has been deployed at a customer site and met a set of requirements for testing and maintenance. They can be used directly or modified to fit your own configuration’s needs.
Why use Helm?
As part of your overall GitOps strategy, Helm is a powerful tool that provides agility, security, and consistency across multiple environments. When paired with a multi-cloud communication tool like Red Hat Service Interconnect, Helm is especially useful for complex deployments that are using multiple microservices across multiple cloud providers.
For Kubernetes developers, Helm charts are a simple, quick, and easy way to spin up applications that can then be reused or shared with others.
For system administrators and other IT operations professionals, Helm provides a consistent tool for implementing and streamlining continuous integration and continuous development (CI/CD) into their application pipelines. It’s a tool that provides agility alongside consistency.
To try out the full process, from creating a chart to configuring values and deploying the chart, check out the following tutorials from Red Hat® Developer.
The official Red Hat blog
Get the latest information about our ecosystem of customers, partners, and communities.