Introduction to Helm Charts

Kirti Garg
4 min readJul 2, 2021

--

What is Helm?

“A helmsman or “helm” is a person who steers a ship, sailboat, submarine, other types of maritime vessel, or spacecraft.” — Wikipedia

When deploying an application on Kubernetes, it is required to define and manage several Kubernetes resources such as pods, services, deployments, and replicasets. Each of these require to write a group of manifest files in YAML format. In the context of a complex application deployment it becomes a difficult task to maintain several manifest files for each of these resources. Furthermore, templating the manifest files and providing configuration parameters externally, can become crucial which will allow to customize the deployments. Dependency management and version control are some other important factors to consider as well. This is where Helm plays a vital role in automating the process of installing, configuring and upgrading complex Kubernetes applications.

Helm is a package manager for Kubernetes. Helm is the K8s equivalent of yum or apt. Helm deploys charts, which you can think of as a packaged application. It is a collection of all your versioned, pre-configured application resources which can be deployed as one unit

No more maintaining random groups of YAML files (or very long ones) describing pods, replica sets, services, RBAC settings, etc. With helm, there is a structure and a convention for a software package that defines a layer of YAML templates and another layer that changes the templates called values. Values are injected into templates, thus allowing a separation of configuration, and defines where changes are allowed. This whole package is called a Helm Chart.

Helm Architecture

Helm uses a packaging format called charts. A chart is a collection of files that describes a related set of Kubernetes resources.

In Helm, there are mainly three notions.

  1. chart : A bundle of information necessary to create an instance of a Kubernetes application.
  2. config : contains configuration information that can be merged into a packaged chart to create a releasable object.
  3. release : A running instance of a chart, combined with a specific config.

Helm Components

Helm Client

Helm client is a command line tool for managing charts.

Charts

Helm packages are called charts, and they consist of mainly YAML configuration files. Following is the basic directory structure of a chart.

Repositories

A Helm chart repository is an HTTP site that serves an index.yaml file and packaged charts. These files can be served by any web server, object storage service, or a static site host such as GitHub Pages.

Helm comes pre-configured with a default chart repository, identified by the name stable. This repository points to a Google Storage bucket at https://kubernetes-charts.storage.googleapis.com. In addition, you can add any external third party repositories. As such any organization can run an operate its own Helm repository.

Releases

When a Helm chart is deployed in a Kubernetes cluster, it is known as a Helm release. This is an instance of a chart that is running in the cluster. Helm automatically maintains a version history of the releases. We can easily get back to any previous state with helm rollback command. Same chart can be deployed multiple times. This result in multiple releases as well.

Difference between V2 and V3

In Version2: In which Tiller service is responsible for everything Tiller service interact with helm and deploy the resources in Cluster

In Version3: Tiller service is removed all the interaction is done by using the RBAC

Here are the Docs Home page and ArtifactHub page.

Install Helm: https://helm.sh/docs/intro/install/

Helm Hub: https://artifacthub.io/

Few Helm Important Commands

  1. helm search hub ( List out all the public charts)

2. helm search hub mysql (for any specific chart i used mysql here we can use any name here as per your requirements)

3. helm search repo stable (it will show only the stable repo)

4. helm repo add stable repo_url ( it will add the stable repo’s)

5. helm repo list (it will list out all the repo in your cluster)

6. helm search repo stable/mysql ( so it will list out all the mysql stable repos)

Note: If we run helm only so where we can see where our all configurations will be stored.

7. helm repo update ( it will pick all the latest repos)

8. helm install stable/mysql — generate-name (it will generate a name of that installation)

9. helm install name stable/mysql

Note : So using the above cmd we are able to deploy the entire infrastructure or deployments in one go

10. helm ls ( list out the deployed charts)

11. helm uninstall name (so it will deleted that charts)

12. helm create mychart ( it will create a new chart i used mychart here we can use any name here as per your choice)

Hope is helps 🙂

--

--

Kirti Garg
Kirti Garg

Written by Kirti Garg

DevOps|Kubernetes|AWS|Docker

No responses yet