In simple terms, Helm is a Package manager for kubernetes so you can think of it as apt, yum or homebrew for Kubernetes . It's a convenient way to package YML files of kubernetes and distribute them in a public and private registry. Helm deploy charts containing all your pre -configured application resources.
Helm is a client/server application and has a server called Tiller (the helm server) which gets installed when installing Helm on your machine. Basically, Tiller receives requests from the client and installs the package into your cluster.
Once you have Helm installed and configured you will be able to install and deploy your applications into your Kubernetes cluster with one very simple
HELM CHART - Helm chart is a bundle of YML files that is created once by someone and packaged them up and make it available in Helm Hub so other people can use the same for deployment in K8 cluster. Once you have installed and configure a Helm into your cluster ,by running a single command helm install will set up the deployment of your applications.
Overall using Helm you can create your own helm charts or bundles of those YML files and push them to the helm repository to make it available for others or you can download and use existing helm charts that other people pushed and made available in different repository. So for commonly use deployments like database applications elastic search, MongoDB,MySQL, Or monitoring applications like Prometheus all have charts available in helm repository.
So now you have a K8 cluster and need some kind of deployment, you can do either using the command line so you can do helm search keyword or you can go to Helms public repository Helm Hub .
There are three main features in Helm given by :
1. Chart: A bundle or a package of pre-configured K8 application resources that needs to deploy into K8 cluster.
2. Release: A release tracks , backup and store a chart that has deployed to the cluster using Helm. For each installation it's created and stored .so with this feature we can list the different release version of our charts , upgrade and rollback .
3. Repository: A centralized group of published charts that are available to world.
HELM CHART STRUCTURE :
If we want to create a new helm chart then simply run helm create [chart name] once it successfully executed the directory structure look like this :
YOUR-CHART-NAME/ | |- .helmignore | |- Chart.yaml | |- values.yaml | |- charts/ | |- templates/
1. .helmignore: It contains all the files that has to be ignore when packaging the helm chart for the deployment into cluster . It's similar to .gitignore in the GitHub.
2. Chart.yaml: It contains all the information and metadata about the Helm chart that you are packaging. for example version number, container name etc.
3. Values.yaml: It is where you put all the values (like as variables) that you want to use into your templates for the K8 deployment .
4. Charts: In this file you store other dependent charts which are depends on .
5. Templates: This directory is where you contain the actual YML templates files which you are deploying with the chart using values and info of charts.
For example, you have to deploy an Apache web server that needs some services , configurations and secrets for the deployment. So You will have to create deployment.yaml, service.yaml, config.yaml and secrets.yaml all in the template directory and they will all get their values and chart metadata from above value.yml and chart.yml file.
In sumary Kubernetes is a very useful orchestration tool for managing containers, and Helm is a very efficient way to employ Kubernetes. The DevOps team can do the same deployments and manage Kubernetes with standard kubectl commands, but working with Helm gives you the ability to quickly define, manage and easily deploy applications. Thus, Kubernetes with Helm can easily become the foundation toolset for any DevOps.