In recent years, Kubernetes has exploded tremendously. At the same time, it creates new communities including ecosystems that make it easier to develop and deploy complex applications. If Kubernetes means the shipman of the ship, then Helm is the steering wheel of that shipman in the career of every DevOps and Developer.
Helm is a Package Manager for Kubernetes, analogous to NPM or YARN. However, it’s not just the Package Manager, it is also a Deployment Management for Kubernetes. In simpler terms, instead of having to define various Kubernetes resources to deploy an application, with Helm you just type a few commands in the terminal and enter, done!
In this article, we will learn about Helm, a powerful tool that makes life working with Kubernetes easier than ever. Although these terms are quite common with developers today, we will skim a jiffy for those who don’t know:
Helm has 4 basic concepts:
Helm has a fairly simple client-server architecture, including a CLI client and an in-cluster server running in the Kubernetes cluster:
Here are some basic concepts and architectures to help you understand and grasp Helm more quickly. In the next section, we’ll take some tutorials to deep dive into Helm. Let’s do it!
Before we begin, we’ll need to prepare a few things for us to be able to practice with Helm.
There are multiple ways to install Helm that are obviously described on the Helm documentation. Helm has two parts: The Helm client (helm) and the Helm server (Tiller). The quickest way to install helm on macOS is using Homebrew, a package manager for macOS platforms.
It is a simple command to install the Helm client locally via Homebrew:
brew install kubernetes-helm
Next step is to initialize helm, please ensure that the Kubernetes cluster is running and accessible through kubectl. When you initialize helm, a deployment named tiller-deploy will be deployed in the kube-system namespace.
Initialize helm using the following command.
You can check the tiller deployment in the kube-system namespace using kubectl command.
kubectl get deployment tiller-deploy -n kube-system
Deploy an Application using Helm
Now we’re going to deploy a Kafka cluster using helm.
It’s many charts of Kafka when we search on the Helm Hub. Unfortunately, Kafka doesn’t have a Stable chart, so you can choose which one fits with your use case. For this tutorial, we’ll install the Kafka chart of Bitnami into queue-production namespace.
As a simple way, we can install Kafka with helm by the following command:
//charts.bitnami.com/bitnami helm repo update helm install bitnami/kafka --name kafka --namespace queuehelm repo add bitnami https:
Now, it already installed on your Kubernetes cluster, but it may not work properly for your needs. For me, I usually looking for a values.yaml file, and store it locally to save a specific configuration for instance of the application.
Execute the following helm install command to deploy a Kafka with your Config in values-prod.yaml. It will download the Kafka helm chart from the Bitnami repo and apply your configuration via values.yaml file.
helm install bitnami/kafka \ --name kafka-prod \ --namespace queue-production \ -f bitnami/values-prod.yaml
You can check the install helm chart using the following command
If you want to delete that installation from the Kubernetes cluster, you can use delete command:
helm delete --purge kafka-prod
We’ve witnessed the ecosystem around Kubernetes blossom, and new tools are appearing every day. Helm is an essential tool for DevOps and Developer using Kubernetes in their production environment. Tools like Helm are often used when considering quick deployment strategies and cost savings in operations.
You can refer to more information in the documentation of Helm. In the next article, I will show you how to create a Helm Chart of NATS-streaming. Hopefully, this article will help you who are intending to learn about Helm as well as the necessary tools of the DevOps. Thank you, please give me your commend if there are deficiencies and I will do better in the next articles.
Drop us a message if you need any helps from the DwarvesLet's build something