In this blog, we will look at what Helm charts in Kubernetes and how it can help you to ease your life, you have to just install charts and everything in Kubernetes gets launched according to it.
What is Helm?
As per helm, definition-Helm helps you manage Kubernetes applications — Helm Charts helps you define, install, and upgrade even the most complex Kubernetes application.
Helm is a package manager of Kubernetes. Just like apt, yum,npm.
Charts are easy to create, version, share, and publish — so start using Helm and stop the copy-and-paste.
Benefits of using Helm
- Manage Complexity:- In complex application architecture, you have many Kubernetes manifest files that you have to provision and delete also.
- Easy Updates:- With Helm you can upgrade your helm charts and also get to your previous versions.
- Simple Sharing:- Charts are easy to version, share, and host on public or private servers or there are many ways you can host your helm charts repositories.
- Rollbacks:- Use helm rollback to roll back to an older version of a release with ease.
Installation of Helm
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
There are also other ways to install Helm also you can check this link https://helm.sh/docs/intro/install/
Let’s take you to dive into understanding Helm charts Architecture.
Helm Charts Architecture
Seems confusing right 🙄 🤔 ? Let me explain this one by one
- Chart.yaml: This is basically the information about the chart and the package like version number, descriptions, etc. and you have to put these details in this file.
- values.yaml: This file plays an important role for ex: if we have many Kubernetes manifest files and if we want to modify that we have to change each file. so by this file, we can give all the things that are not static to these files and pass this thing as variable to files
- Charts: This is like for the dependency for the Kubernetes objects which depends on other Kubernetes files like to store other charts that on which your chart depends.
- Templates: This is one of the important directories where you are putting all your Kubernetes manifest files that need to be installed upon the “helm install” command For Ex: you are deploying the Nginx deployment you need deployment file, service file, config file, secrets file that needs to be placed in this directory
- .helmignore: It is similar to the .gitignore file where you can mention the file names to be ignored when the packaging of the chart is to be done.
Let’s install a Simple Helm chart
To create the Helm chart
helm create chartname
The chart is created. Go to that directory to explore the files.
Note: By default, helm gives the Nginx image as deployment
After creating its time to install the charts
helm install name chart name
As you can see that chart is installed and you can check it with
Kubernetes get pods
Now go on, create your own helm charts, and play around them. Thanks and Cheers to you for paying attention 🙌.