Install Helm Chart
In this tutorial, we will discuss how to install the helm chart once the repository is configured with the client.
What are helm charts ?
Helm Charts are simply Kubernetes YAML manifests combined into a single package that can deploy to your Kubernetes clusters. Helm charts are easy to create, version, share and publish
In our installation, we do have a stable repository. I can list the repositories available using the following command
$ helm repo list NAME URL stable https://charts.helm.sh/stable
So I do have one stable repository, and this is the URL from where it will pick the charts, and this URL is a constant one.
Update helm repository
Now, let me go ahead and update this particular repository so that any future charts available as a part of this specific repository will get added and get cached in this specific client location.
$ helm repo update Hang tight while we grab the latest from your chart repositories… …Successfully got an update from the "stable" chart repository Update Complete. ⎈Happy Helming!⎈
So it’s going to be called the latest information and update the cache. All the charts are the latest ones now.
Now I can go ahead and search for the repository, say MySQL, helm search repo stable/mysql. So, I do have the chart, and that will use version 5.7.30 of MySQL.
$ helm search repo stable/mysql NAME CHART VERSION APP VERSION DESCRIPTION stable/mysql 1.6.9 5.7.30 DEPRECATED - Fast, reliable, scalable, and easy… stable/mysqldump 2.6.2 2.4.1 DEPRECATED! - A Helm chart to help backup MySQL…
Let me go ahead and do the installation of this particular latest version. In case if I wanted any specific version, I can go ahead and do the installation.
So to get started quickly, I’m going to use the stable and latest version.
$ helm install stable/mysql --generate-name
In the above command, I requested the helm to generate a name for this particular installation. Now The installation is done.
The above command also provides the nodes in terms of how to access the MySQL deployed within the Kubernetes cluster and how I can test this particular MySQL installation.
Please note that in the same machine, I do have the Kubernetes client installation that is kubectl. I can check the deployed entities as a part of this specific cluster using the following command.
$ kubectl get all
Would you please make yourself comfortable with the basics of Kubernetes commands? If you wanted a revision, you could verify the tutorials I have posted related to Kubernetes here.
So this particular chart deployed a POD and the service MySQL. And a deployment, so automatically, it configured the replica set deployment, service, and the POD.
For the time being, Let’s not worry about these particular details from where these details are configured and how we will provide the details to the Kubernetes.
Install helm using our own name
In the same way, let me go ahead and do another installation, helm install stable/airflow, and give a name to it, myairflow.
In the earlier command, we asked the helm to generate a name, this time, and I’m giving my own name for this particular chart.
$ helm install myairflow stable/airflow
For the time being, let’s not worry about this particular chart, what it does, and get into the details of this specific chart.
So it’s going to provide information on how this particular entity is deployed within the cluster and how to access them.
I can get the details about these PODs and services using the kubectl get all command. So all the required PODs Services, deployment, replica set everything got deployed, and all the required information will be available.
So basically, the helm charts it’s going to facilitate deploying various components of Kubernetes. And in one single go, using a single command, we can deploy the entire infrastructure required for the application to be up and running within Kubernetes.
I can list what are all the charts that got deployed by using the following command
$ helm ls
Here we have two charts myairflow, what’s the version, the revision currently one revision and the application version. That information will be available.
If I wanted to delete any specific chart, I can go ahead and do that. Let me delete one helm that I installed previously.
$ helm uninstall myairflow
So it will remove all the entities related to this particular chart from the Kubernetes cluster as well.
So in a quick summary, we have seen how to import the repositories, verify the charts within the repository, use a chart and do a quick release into the Kubernetes cluster using the helm install command.
Again, let me remind you all this is a quick introduction; we will have a detailed discussion on every command And its syntax in the future tutorials.