What is Helm?

In Devops
July 17, 2023

Helm is a package manager for Kubernetes. It is used to facilitate the deployment and management of applications in a Kubernetes environment.

Helm creates and manages packages with templates called charts. These charts contain files to define and configure application components and dependencies. A chart can include various components such as services, pods, and deployment.yaml files. Helm allows us to easily manage application versions and scenarios like rollback and scaling. To use Helm, we need to initially install it on our local environment.

Installation for macOS (Homebrew):

  1. brew install helm

Installation for Windows (Chocolatey):

  1. choco install kubernetes-helm

Installation for Linux (Chocolatey):

  1. bashCopy codecurl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
  2. sudo apt-get install apt-transport-https --yes
  3. bashCopy codeecho "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
  4. sudo apt-get update
  5. sudo apt-get install helm

Let’s perform the installation of a simple hello-world application and deploy it to a Kubernetes environment:

You can create a basic Helm chart with the following command:

  1. helm create hello-world

When you examine it, you’ll see that it generates all the components for you. You can edit the values and provide the necessary configurations either by editing the values.yaml file or by creating a custom values.yaml file for yourself. For now, I will add my own Docker image to the repository and deploy it.

Finally, you can deploy the application with the following command:

  1. helm install -f hello-world/values.yaml -n test hello-world ./hello-world

To check if the application is running, you can port-forward it with the following command and open 127.0.0.1:8080 in your browser:

  1. kubectl --namespace port-forward hello-world 8080:80

Until next time in my next article…