Helm is the package manager for Kubernetes, akin to
apt on Debian and Ubuntu, or the pip package manager for Python. It allows administrators to install and manage applications in their Kubernetes cluster with ease. In this tutorial, we will explore how to use the Helm package manager for Kubernetes on a Linux system.
In this tutorial you will learn:
- How to install Helm on Linux
- How to use Helm with example commands
|Category||Requirements, Conventions or Software Version Used|
|System||Any Linux distro|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
Install Helm on Linux
There are multiple ways to install Helm on Linux, such as with Homebrew or Snap:
$ brew install helm
$ sudo snap install helm --classic
Alternatively, you can download the binary from the Helm GitHub page.
How to use Helm with example commands
Helm, like some other package managers, comes with its own jargon that would be very advantageous to learn in order to save you some headaches down the road:
- Chart = A Helm package
- Release = An installed package
- Repository = Where the charts are stored for public download
As an example, if you need to run two Nginx web servers, you can install the Nginx chart two times, which would give you two Nginx releases on your Kubernetes cluster, both with unique names to distinguish them from each other.
Ready to get started using Helm? Here are some example commands:
- Use the
searchargument to search for a matching chart to install. For example, to search for an Nginx chart:
$ helm search hub nginx
hubargument above instructs Helm to search the Artifact hub which combines many different repositories.
- To add a specific repository to Helm, we use the following syntax:
$ helm repo add bitnami https://charts.bitnami.com/bitnami
- We can search the repository we just added for an Nginx chart by using:
$ helm search repo nginx
repoargument above will instruct Helm to search all of our configured repositories.
- Use the
installargument to install a chart:
$ helm install my-nginx bitnami/nginx
In this command,
my-nginxis the name for our release (as it will appear in our Kubernetes cluster), and
bitnami/nginxis the repository and chart that we wish to install.
- To check the status of your installed release, or to see its configuration settings:
$ helm status my-nginx
- Retrieve the latest repository chart information:
$ helm repo update
- See all installed releases:
$ helm list
Or to see all releases including uninstalled ones:
$ helm list --all
- Uninstall a release:
$ helm uninstall my-nginx
- To see a list of all commands and additional help information:
$ helm get -h
In this tutorial, we saw how to install and use the Helm package manager on a Linux system. This tool goes hand in hand with Kubernetes and streamlines the downloading and deployment of applications onto your Kubernetes cluster. It also has some management tools built in that can be used on top of Kubernetes’ own commands.