Understanding Helm Charts

Hi Folks in this post we will cover basics & working of Helm Charts.

Before starting with what is Helm ?. Will go back in the time when we were not having Package Manager like(apt & yum ) to install apache,nginx etc.During those days people use to download binaries compile and install. So for example to install apache every organization had their own methods ,steps to install packages.So there was no standard method to install packages .

Well then Package Managers like (YUM & APT) were introduced & which had a standard method ,steps to install packages. That’s how it made the life easy.

So in todays world most of the companies are running their container workload on Kubernetes . In Kubernetes world to run a simple apache container every organization have their own manifests(YAML) files.There is no standard method defined to deploy containers into Kube cluster.

Now HELM comes with the solution for all the above problems.

What is HELM ???. In simple language Helm is a package Manager for Kubernetes. Package managers (like yum and APT) are a big reason many of the popular Linux distributions are as successful as they are. They provide a standard, opinionated way to install, configure, upgrade, and run an application in a matter of minutes. And the packages themselves are open source, and anyone can contribute to them.

This is exactly what Helm does for Kubernetes.

Helm is made of two components: A server called Tiller, which runs inside your Kubernetes cluster and a client called helm that runs on your local machine. A package is called a chart to keep with the maritime theme.

With the Helm client, you can browse package repositories (containing published Charts) and deploy those Charts on your Kubernetes cluster. Helm will pull the Chart and talking to Tiller will create a release (an instance of a Chart).

Structure of a Chart

A Chart is easy to demystify; it is an archive of a set of Kubernetes resource manifests that make up a distributed application. Check the GitHub repository, where the Kubernetes community is curating Charts. As an example, let’s have a closer look at the MariaDB chart. The structure is as follows:

├── Chart.yaml
├── README.md
├── templates
│   ├── NOTES.txt
│   ├── _helpers.tpl
│   ├── configmap.yaml
│   ├── deployment.yaml
│   ├── pvc.yaml
│   ├── secrets.yaml
│   └── svc.yaml
└── values.yaml
  1. Chart.yaml = contains some metadata about the Chart, such as its name, version, keywords.
  2. values.yaml=contains keys and values that are used to generate the release in your Cluster. These values are replaced in the resource manifests .
  3. configMap.yaml=contains database configuration.
  4. secrets.yaml= database passwords are stored in secret file.

The actual values of the passwords are read from the values.yaml file. you

To run Jenkins container in kube cluster you just need two commands .

  1. you need to search the stable package using below command

helm search jenkins

2. select the appropriate package and install it

helm install <package name>

It will deploy a jenkins container in your Kube cluster.

Hope this helps you in understanding basics of helm chart

Reference links :

  1. Install helm in Kube cluster