Helm chart on artifact.io

Manojnagabairu
4 min readSep 7, 2022

What is Helm?

In simple terms, Helm is a package manager for Kubernetes. Helm is the K8s equivalent of yum or apt. Helm deploys charts, which you can think of like a packaged application. It is a collection of all your versioned, pre-configured application resources which can be deployed as one unit. You can then deploy another version of the chart with a different set of configurations.

Helm helps in three key ways:

  • Improves productivity
  • Reduces the complexity of deployments of microservices
  • Enables the adaptation of cloud-native applications

Why use Helm?

Writing and maintaining Kubernetes YAML manifests for all the required Kubernetes objects can be a time-consuming and tedious task. For the simplest of deployments, you would need at least 3 YAML manifests with duplicated and hard-coded values. Helm simplifies this process and creates a single package that can be advertised to your cluster.

Helm is a client/server application and, until recently, has relied on Tiller (the helm server) to be deployed in your cluster. This gets installed when installing/initializing helm on your client machine. Tiller simply receives requests from the client and installs the package into your cluster. Helm can be easily compared to RPM of DEB packages in Linux, providing a convenient way for developers to package and ship an application to their end-users to install.

Once you have Helm installed and configured, you can install production-ready applications from software vendors, such as MongoDB, MySQL, and others, into your Kubernetes cluster with one very simple helm install command. Additionally, removing installed applications in your cluster is as easy as installing them.

What are Helm charts?

Helm Charts are simply Kubernetes YAML manifests combined into a single package that can be advertised to your Kubernetes clusters. Once packaged, installing a Helm Chart into your cluster is as easy as running a single helm install, which simplifies the deployment of containerized applications.

Now Let’s come to the practical part.

For creating Helm charts we have to first create a directory, just make sure you have helm install according to your OS distribution. Give a proper name to your directory because its name will be your package name.

After creating a directory, make a Charts.yaml file inside that directory

The above picture describes the basic content to be provided into the Charts.yaml file, after providing the content make a folder named templates and put all your YAML files into the templates folder

in my case, I am launching a WordPress application with a MySQL database. After doing all the processes go to the same location in which your base folder is located and enter helm install <application name> <folder location> command, here folder location is the location of the folder in which your Charts.yaml file and templates folder is located.

as you can see our helm install command works fine, Now just check if your package launched or not with the helm list command

as you can see our application is launched perfectly.

as you can see our deployments are running properly and services are also exposed.

Now for uploading your chart to artifacthub.io you just have to archive the package with the helm package command, just create a charts folder in the same location where your package folder is located and run the below-mentioned command.

here WordPress is my base folder name and your package is created. The last step which you have to do is upload this charts folder to GitHub and host the repository from GitHub pages option inside settings of repository and copy the URL provided after hosting the repository and just append {/charts} at the end of your URL as all your files are inside charts file.

After doing the above process go to artifacthub.io go to the control panel inside artifacthub.io and click on ADD as shown below to add your chart.

Thanks for reading my blog😀

--

--