Helm Explained

Siddhant Prateek Mahanayak
4 min readJul 10, 2023

What is Helm?

Helm is an open-source package manager for Kubernetes. It is used to install, upgrade, and administer apps on Kubernetes clusters. Helm charts are the package format in which Helm defines an application. In this blog post, we will go over all you need to know about Helm charts.

A Helm chart consists of several components that are organized into a specific folder structure.

  • Chart.yaml file, which contains metadata about the chart such as its name, version, and description. This file is used to describe the chart and provide information about the application that it represents.
  • values.yaml file, which contains configurable parameters that are used to customize the installation of the chart. This file is used to define the values that are used during the installation of the chart, such as the number of replicas, the image to use, and other configuration options.
  • charts/ directory, which can be used to store any dependencies that the chart may have. For example, if your application requires a database, you can include the database as a dependency in the charts/ directory. This will ensure that the database is installed along with the application when the chart is deployed.
  • templates/ directory, which contains Kubernetes manifests that define the resources to be deployed. This directory is used to define the Kubernetes resources that are required to run your application, such as deployments, services, and ingress rules. The templates in this directory are used to generate the Kubernetes manifests that are deployed to the cluster.

Overall, the folder structure of a Helm chart is designed to be intuitive and easy to use. By organizing the components of a chart into specific directories, developers and operators can quickly understand how the chart functions and how the application is deployed. This makes it easier to manage applications on Kubernetes clusters and to share those applications with others.

Benefits of using Helm charts

Helm charts provide several benefits to developers and operators alike.

  • Firstly, they simplify the deployment of applications as they contain all the necessary Kubernetes resources and configuration files bundled into a single package. This means that you can deploy your application with a single command, without having to worry about managing individual Kubernetes resources.
  • Secondly, they enable easy distribution of applications as they can be shared and used across multiple Kubernetes clusters. This makes it easy for developers to share their applications with others, and for operators to deploy the same application across different environments.
  • Thirdly, Helm charts provide versioning, allowing developers to track changes to an application and rollback to previous versions if necessary. This means that you can easily roll back your application to a previous version if you encounter any issues during deployment or if you need to make changes to your application.

Developing using Helm Charts

Before we can start building our sample application using Helm Chart, we need to install Helm. Helm can be installed on various operating systems, including Windows, Mac, and Linux. You can follow the installation guide on the official Helm website to install Helm on your operating system.

Create a Helm Chart

Once you have installed Helm, you can start building your sample application using Helm Chart. The first step is to create a Helm Chart. A Helm Chart is a collection of files that define the structure of a Kubernetes application. To create a Helm Chart, you can use the helm create command.

helm create {chart-name}

This command will create a new directory with the specified chart name. The directory will contain the necessary files to define the application, including the Chart.yaml file, which contains metadata about the chart, and the values.yaml file, which contains default values for the chart.

Install the Chart

Once you have defined your application using the Helm Chart, you can install it on your Kubernetes cluster using the helm install command.

helm install {chart-name} {release-name}

Helm chart involves defining the application’s Kubernetes resources and packaging them into a chart. Once a chart is created, it can be installed using the helm install command. The installation process involves providing values for the configurable parameters in the values.yaml file.

Upgrade and Rollback the Chart

One of the benefits of using Helm Chart is that it allows you to upgrade and rollback your application easily. You can upgrade your application by modifying the values.yaml file and using the helm upgrade command.

helm upgrade {release-name} {chart-name}

This command will upgrade the chart with the specified chart name and release name on your Kubernetes cluster.

If you encounter issues after upgrading your application, you can rollback to the previous version using the helm rollback command.

helm rollback {release-name} {revision-number}

This command will rollback the chart with the specified release name to the specified revision number.

Conclusion

Helm charts are a powerful tool for managing applications on Kubernetes clusters. They simplify the deployment process, enable easy distribution of applications, and provide versioning capabilities. By understanding the components of a Helm chart, developers and operators can create, distribute, and use Helm charts efficiently. Helm charts are a great way to package and deploy your Kubernetes applications, and they can help you to streamline your deployment process and reduce the complexity of managing your Kubernetes resources.

--

--