Helm is a powerful tool which can help you manage your most complex applications running on Kubernetes. It works as a wrapper on the top of Kubernetes to manage applications. This is the best possible way to find, use and share the application built to run over Kubernetes. Helm is one of the incubating projects in CNCF family The latest version of Helm is maintained by the CNCF – in collaboration with Microsoft, Google, Bitnami and the Helm contributor community.
Terminology of Helm
- Chart – A Chart is a Helm package. It contains all of the resource definitions necessary to run an application, tool, or service inside of a Kubernetes cluster just like an RPM file or a Yum package.
- Repository – It is a place where Helm charts are stored and shared. It’s a package repository for Kubernetes applications.
- Release – A Release is an instance of a chart running on Kubernetes. A chart can be installed many times into the same cluster. And each time it is installed, a new release is created. If you want to run multiple instances of the same application at the same time on Kubernetes then install the application chart multiple times. Each release will have its own name.
There are 2 components of Helm-
- Helm Client – It is a command-line client for end users. The client is responsible for the following –
- Local chart development
- Managing repositories
- Interacting with the Tiller server to install a chart, update a release, etc.
- Tiller (Helm Server) – It is an in-cluster server that interacts with the Helm client, and interfaces with the Kubernetes API server. The server is responsible for the following:
- Listening for incoming requests from the Helm client
- Installing charts into Kubernetes.
- Upgrading and uninstalling charts by interacting with Kubernetes etc.
- You must be having a Kubernetes cluster ready to install and configure Helm. (Minikube will be enough)
- You must be able to interact with the Kubernetes cluster using Kubectl.
- Helm will figure out where to install Tiller by reading your Kubernetes configuration file (usually $HOME/.kube/config). This is the same file that Kubectl uses.
Note: There are multiple ways to install Helm but we are using binary releases here. Here we are using Minikube as a Kubernetes cluster for Helm installation. We will go with the default configuration of Helm.
- Download the Helm binary –
- Initialize Helm and Install Tiller –
- Verify Tiller installation –
By default, a Tiller pod will be created in the kube-system namespace
Run your first application using Helm-
After the installation of Helm and Tiller, we will try to run an application using a Helm chart. We will run MYSQL over Kubernetes using its chart.
Run the following commands to update and list the Helm repositories-
You can add multiple repositories to Helm client.
List all the available charts –
Search for a specific chart-
Install MYSQL using a helm chart-
A chart can be installed using its name.
List the Helm releases-
It will give the release of MYSQL that you just created.
Verify the MYSQL installation over Kubernetes-
Delete a release-
To delete a release or uninstall an application, use the name of the release.
Apart from this, there are multiple options that Helm provides you such as creating your own chart from scratch, share it with the other teams, customize an existing chart according to you by overriding the default configuration, etc. I hope this blog can help you to start with Helm.