Install helm on ubuntu

Install Helm on Ubuntu

Helm is a tool for Kubernetes, used to deploy Kubernetes applications by combining configuration files into a single package called a Helm Chart. Because it is better to update a single configuration file instead of editing multiple configuration files. The deployment of the Kubernetes applications becomes extremely easy with the Helm.

In this guide, I will get into different approaches for implementing Helm on Ubuntu.

Note: The instructions and commands mentioned in this guide are performed on Ubuntu 22.04. These commands will also work on all Ubuntu flavors and Debian-based distributions without an issue.

Install Helm on Ubuntu

Helm offered several installation methods for Linux, and they can be used to install it on Ubuntu.

1. Using Snap

The snap package manager comes by default on Ubuntu and is the fastest way to get Helm up and running on it. To download and install the helm package, type the following command in the terminal.

sudo snap install helm –classic

Install helm on ubuntu 1

The snap package is containerized and is normally larger in size compared to deb. If you want to remove it from the Ubuntu, then use the snap remove command.

sudo snap remove helm

Install helm on ubuntu 2

2. Using Binary Release

The first method involves downloading the tar file from the official website.

Download the Linux version from Here.

Go to the directory where the file is downloaded using the cd command; in my case, it is downloaded in the Downloads directory.

Install helm on ubuntu 3

Untar the file using the Linux tar command.

sudo tar -zxf <filename>

In the above command, the z flag is used to uncompress the gz file, x to extract the archive, and f to read/write the mentioned file. In my case, the file name is helm-v3.14.0-linux-arm64.tar.gz.

sudo tar -zxf helm-v3.14.0-linux-arm64.tar.gz

Install helm on ubuntu 4

After extracting the archive, a directory will be created in the current working directory with the name linux-arm64. The directory name may change depending on the file name.

Navigate to this directory using the cd command.

cd linux-arm64

In this directory, you will get three files, helm, LICENSE, and README.md.

Install helm on ubuntu 5

Move the helm binary to the /usr/local/bin directory using sudo and mv (move) commands.

sudo mv helm /usr/local/bin/

Install helm on ubuntu 6

That’s it! The Helm installation on Ubuntu is completed, verify the installation using helm version command.

helm version

Install helm on ubuntu 7

The output signifies that the Helm has been installed on Linux.

To uninstall helm from Ubuntu, simply remove the helm from /usr/local/bin/ directory.

sudo rm /usr/local/bin/helm

3. Using Script

The second method to download and install Helm to Ubuntu is using the script. To download the latest script of Helm, execute the following command.

See also  The Coronation of a New Mascot: Noble Numbat
Sponsored
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3

The aforementioned command retrieves the most recent Helm script and downloads it in the current working directory under the name get_helm.sh.

To make the script executable, give it the required permission using the chmod command.

sudo chmod 700 get_helm.sh

Execute the script to begin the installation process.

./get_helm.sh

The helm will download and install in the /usr/local/bin/ directory. Verify by checking its version.

Install helm on ubuntu 8

To uninstall it, use the same approach mentioned at the end of method 2 (Using Binary Release).

4. Using APT

To install the Helm package to Ubuntu using APT, first, we need to add its repository; see the following steps.

First download and install the public key using.

curl https://baltocdn.com/helm/signing.asc | gpg –dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null

Install helm on ubuntu 9

Here, curl https://baltocdn.com/helm/signing.asc is downloading the public ASCII armored key while gpg –dearmor is converting it to binary.

The tee /usr/share/keyrings/helm.gpg is writing the converted binary to the helm.gpg file.

You will not see any output because all the standard output is going to /dev/null.

Add the repository by executing the below-mentioned command.

echo “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

Install helm on ubuntu 10

Here, the argument of the echo which contains the repository information is written to the sources.list.d/helm-stable-debian.list file.

Now, to access the repository through the secure HTTPS protocol, install the apt-transport-https package, though it is an optional step.

It should be noted that apt-transport-https package has been built in the APT since its 1.5 version and is available in the latest Ubuntu releases.

sudo apt install apt-transport-https –yes

Install helm on ubuntu 11

Now, update the repository list and install the helm using APT.

sudo apt install helm

Install helm on ubuntu 12

To verify, use the helm version command. But if it shows an error, then reboot the system.

Install helm on ubuntu 13

To uninstall it, use the following command.

sudo apt remove –autoremove helm

Install helm on ubuntu 14

Conclusion

In order to enhance the efficiency of Kubernetes package deployment, the Helm tool is used. There are various methods to install Helm on Ubuntu such as through Snap, APT, Script, and official Binary Release. In this tutorial, all of these methods are discussed. I prefer to install Helm using snap, as it can be done by just executing a single command. However, it also depends upon the system’s requirements. The uninstallation methods of Helm are also listed along with respective installation methods.

Leave a Comment

Only people in my network can comment.