How to Install Helm on Ubuntu, macOS, and Windows?

Photo of author

By admin

Anybody who possesses some experience in Kubernetes knows about the complexity of the procedure of deploying apps. It is among the worst challenges one could face while working with Kubernetes.

However, the success of Kubernetes has led to the constant innovation of some useful tools intended to reduce or eliminate such complexities and one such tool is Helm. This tool is perfect for IT teams as it helps manage Kubernetes apps via Helm Charts with ease. These Helm Charts make the deployment of various K8s apps almost effortless. This article seeks to inform you about the ways to install Helm on Ubuntu, macOS, and Windows. So, without wasting any time, let’s get started with this.

Why Install Helm on Your System?

Now, before proceeding further to explain the procedure to install Helm on Ubuntu, macOS, and Windows PC, it is important for you to know why to consider installing Helm anyway. Well, Helm offers several hard-to-ignore benefits for Kubernetes users with the most prominent ones being discussed as follows:

  • The first and foremost perk of Helm is its Helm Charts. As you must know, Helm Charts eases the process of installing Kubernetes apps. They leverage K8s packages using only a CLI command or via a button click. Besides this, it’s also possible to contain particular Helm charts within others and enjoy various dependencies.
  • Another great pro of Helm is that it’s constructed on K8s. Helm Charts help to enhance Kubernetes’ cluster architecture. While deploying your apps utilizing Helm, you get the freedom of adjustability by default. The charts Helm uses are all stowed in an archive known as Helm Workspace. The developer teams can look up those charts whenever needed and effortlessly make them a part of their projects.
  • Another reason behind the Helm’s wide acceptance and good reputation is that it offers freedom of customizing app setups while deploying them. The developers are capable of customizing all the Kubernetes apps and resources as they like. This, in turn, sparks increased creativity.
  • Helm also contributes a lot to the CI/CD pipelines. The tool offers various CI/CD integration hooks, allowing developers to mechanize some actions. This automation could take place before initiating an installation process or after upgrading an app. Additionally, one may also opt for health checkups for Helm to ensure the successful completion of deployment.
  • Helm also indulges itself in database management using all the available release versions. Thus, in case things go south somehow during deployment, rollback becomes effortless.

Now, as you have become familiar with the top reasons to install Helm on Ubuntu, macOS, and Windows, it’s time to discuss the steps essential for installing Helm on each OS one by one.

Installing Helm on Ubuntu

First, let’s see how to install the Helm tool on Ubuntu. While not that tough, things can get problematic if you fail to follow all steps carefully. So, please pay attention.

Prerequisites

  • A fully set up Kubernetes cluster
  • A user having sudo access enabled

Step 1: Install the Helm app

Installing the Helm app itself is pretty easy. It is because Helm is a ready-made binary executable. Therefore, it doesn’t demand any additional effort other than downloading and installing it thereafter.

So, first, sign in to your master node’s Kubernetes cluster and download Helm by running the following common in terminal:

wget https://get.helm.sh/helm-v3.0.2-linux-amd64.tar.gz

Once you’re finished downloading the Helm file, unwrap it using the below command:

tar xvf helm-v3.0.2-linux-amd64.tar.gz

Now, with the file at your hand, relocate the Helm executable into the /usr/local/bin directory:

sudo mv linux-amd64/helm /usr/local/bin/

Once the executable gets relocated to the desired location, you’re free to get rid of the file and the directory using the following command:

rm helm-v3.0.2-linux-amd64.tar.gz

rm -rf linux-amd64

After everything is done, utilize the following command to verify whether the Helm installation process was a success or not:

helm version

Doing so will allow you to see release numbers such as GitCommit, GoVersion, etc.

Step 2: Add a chart repository

Helm cannot work properly in the absence of chart repositories. Chart repositories are remote servers utilizing HTTP, responsible for holding index.yml files. Also, it sometimes holds packaged charts. Charts are assemblages of files that help define a K8s resource set. One could also utilize such charts for deploying pods, be it simple or complex, containing a complex pile of services and apps.

Charts have to be furnished in a particular directory tree. Generally, chart directory trees tend to look like the following:

AppName/

Chart.yaml

LICENSE

README.md

values.yaml

values.schema.json

charts/

crds/

templates/

templates/

The tree above is packaged into a chart in such a way that makes deployment a cakewalk via Helm. However, for doing so, one needs to add a chart repository first. Add a chart repository by taking a step back and executing the below command to your master node:

helm repo add stable https://kubernetes-charts.storage.googleapis.com/

If successful, Helm will inform you about the completion of the task.

Next, use this command for listing out the contents inside it:

helm search repo stable

Once you’ve executed the command, you will get to find a list of all the charts on hand.

Step 3: Install a chart

Now that your addition of a chart repository to Helm is finished, it’s time to install the chart. Before doing that, update the repo using this command:

helm repo update

Now, you have to take a chart from our repository and install it. Suppose you wish to install the Nextcloud chart. Utilize the below command for doing so:

helm install stable/nextcloud –generate-name

Once your Nextcloud chart installation becomes successful, you will receive guidance for finishing the deployment. Different charts will give you different instructions. While some of them are plain sailing, others are a bit labyrinthine. Follow them properly to deploy that specific app.

Installing Helm on macOS

Like Ubuntu, installing Helm on your macOS PC is also pretty easy and convenient. Just follow the steps below and you’re good to go.

Prerequisites

  • A fully configured Kubernetes cluster
  • Access to a terminal

Step 1: Install and initialize Minikube

First, install Minikube on your macOS machine and start it. However, you can also use some other Kubernetes clusters of your choice.

Step 2: Install Homebrew

Next, verify if your PC has Homebrew installed by running the command brew –version in the terminal app. If it isn’t installed, you must install Homebrew on your Mac computer. Run the following command in your terminal to install Homebrew:

/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)

Step 3: Install the Helm app using Homebrew

The below Homebrew command will help you install the Helm tool on your macOS machine:

brew install kubernetes-helm

Step 4: Initialize your Helm tool

Finally, initialize both the Helm server and command-line tool to your K8s cluster by executing the following command:

helm init

After successful execution, you will receive the following output:

$ helm init

Creating /Users/matthewpalmer/.helm

Creating /Users/matthewpalmer/.helm/repository

Creating /Users/matthewpalmer/.helm/repository/cache

Creating /Users/matthewpalmer/.helm/repository/local

Creating /Users/matthewpalmer/.helm/plugins

Creating /Users/matthewpalmer/.helm/starters

Creating /Users/matthewpalmer/.helm/cache/archive

Creating /Users/matthewpalmer/.helm/repository/repositories.yaml

Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com

Adding local repo with URL: http://127.0.0.1:8879/charts

$HELM_HOME has been configured at /Users/matthewpalmer/.helm.

Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster.

Note: By default, Tiller is deployed with an insecure ‘allow unauthenticated users’ policy. To prevent this, run command `helm init` with the –tiller-tls-verify flag.

For more information on securing your installation see: https://docs.helm.sh/using_helm/#securing-your-helm-installation

That’s it. You have now become capable of using Helm for packaging and deploying any K8s app you wish to on your macOS machine.

Installing Helm on Windows

Finally, we will shift our focus to Windows. Installing Helm on PCs having Windows OS is nothing fancy.

Prerequisites

  • A running K8s cluster
  • Access to a command-line program
  • A 7Zip extractor

Step 1: Download the Helm file and open the archive

First, navigate to the Helm GitHub website and download the latest Helm file. The file will be in .gz format. Relocate it from its present folder to its own directory.

Once done, open the new directory, followed by the tar.gz archive. The directory will contain only one .tar file. Double-click on that. You will now be capable of seeing a folder, namely windows-amd64, in your 7Zip window. Copy-paste the folder into your preferred directory.

Step 2: Add the Helm program to the System File path

Performing this step will give you easy access to the Helm program from your command line.

Thus, first, launch ‘System’ from your PC’s ‘Control Panel.’ Next, go to ‘Advanced system settings’ and ‘Environment Variables’ in succession. From the ‘System variables’ section, navigate to ‘Path.’ Press the ‘Edit’ button, followed by ‘New.’ Add the path that can lead to your Helm folder. Finish things off by pressing ‘OK.’

That’s all. Your Windows PC will now have Helm fully installed and ready to go. To verify, run this command in Command Prompt:

helm

Provided that your Helm installation is successful, you can initiate it by executing the following command:

helm init

Conclusion

As we said above, many people, even the most adept IT individuals, struggle with the deployment of Kubernetes apps. Kubernetes apps are known for being hard nuts to crack as regards their deployments. That’s where handy tools like Helm could be a lifesaver. By making them a part of your Kubernetes realm, you not only make the app deployment procedure hassle-free but also highly effective. That means, by using such an app, you lessen the probability of failure while deploying various Kubernetes apps.

No matter what OS you possess, installing Helm is pretty undemanding. But you gotta be mindful. Any mistake during the installation and initialization process could mess things up. Also, remember the prerequisites mentioned here, as they’re nothing less than crucial. Make correct step executions, and you will unlock the infinite potential of Helm. Good luck!

Leave a Comment