In this tutorial, we will provide you with a step by step guide on how to install Helm on Kubernetes cluster. We are running a cluster created using kubeadm. So, what is helm? Helm is an opensource package manager for Kubernetes. Helm package manager provides a way to package Kubernetes applications, along with their dependencies, configurations and and deployment instructions, into a portable and reusable format called charts
. This makes it easy for users to distribute, install and even upgrade various Kubernetes applications.
In this tutorial, you will go through a step-by-step process of installing Helm on a Kubernetes cluster
Table of Contents
Step-by-Step Guide: How to Install Helm on Kubernetes Cluster
Prerequisites
Before you can proceed, you need to be having a Kubernetes cluster up and running. In our environment, we are using kubeadm Kubernetes cluster. Check the link below on how to setup Kubernetes cluster with kubeadm.
Setup Kubernetes Cluster on Ubuntu 22.04/20.04
Similarly, you can familiarize yourself with Kubernetes concepts, architecture e.t.c.
Kubernetes Architecture: A High-level Overview of Kubernetes Cluster Components
What are the core concepts in Kubernetes?
Install Helm on Kubernetes Cluster
There are different methods in which Helm can be installed on a Kubernetes cluster. These include;
- Install Helm using Binary Package
- Install Helm using Installation Script
- Install Helm from Helm Package Repository
- Install from the Source code
We will cover the methods of installing Helm on Kubernetes cluster in this guide.
Install Helm on Kubernetes cluster using Binary Package
Helm provides ready helm binary packages for various Operating systems and CPU architectures. You can navigate to the Helm binary package releases page and grab a binary for the your respective OS over which K8s cluster is running.
For example, i am running a Kubernetes cluster on an Ubuntu system thus, I will simply download and install Helm on my Kubernetes cluster as follows;
wget https://get.helm.sh/helm-v3.12.0-linux-amd64.tar.gz
Extract the binary archive, make it executable and copy it to PATH.
tar xzf helm-v3.12.0-linux-amd64.tar.gz --strip-component=1
sudo mv helm /usr/local/bin/
You should be able to use helm
command from your terminal.
If you just type help with no arguments, it will print the help information.
helm
The Kubernetes package manager Common actions for Helm: - helm search: search for charts - helm pull: download a chart to your local directory to view - helm install: upload the chart to Kubernetes - helm list: list releases of charts Environment variables: | Name | Description | |------------------------------------|---------------------------------------------------------------------------------------------------| | $HELM_CACHE_HOME | set an alternative location for storing cached files. | | $HELM_CONFIG_HOME | set an alternative location for storing Helm configuration. | | $HELM_DATA_HOME | set an alternative location for storing Helm data. | | $HELM_DEBUG | indicate whether or not Helm is running in Debug mode | | $HELM_DRIVER | set the backend storage driver. Values are: configmap, secret, memory, sql. | | $HELM_DRIVER_SQL_CONNECTION_STRING | set the connection string the SQL storage driver should use. | | $HELM_MAX_HISTORY | set the maximum number of helm release history. | | $HELM_NAMESPACE | set the namespace used for the helm operations. | | $HELM_NO_PLUGINS | disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. | | $HELM_PLUGINS | set the path to the plugins directory | | $HELM_REGISTRY_CONFIG | set the path to the registry config file. | | $HELM_REPOSITORY_CACHE | set the path to the repository cache directory | | $HELM_REPOSITORY_CONFIG | set the path to the repositories file. | | $KUBECONFIG | set an alternative Kubernetes configuration file (default "~/.kube/config") | | $HELM_KUBEAPISERVER | set the Kubernetes API Server Endpoint for authentication | | $HELM_KUBECAFILE | set the Kubernetes certificate authority file. | | $HELM_KUBEASGROUPS | set the Groups to use for impersonation using a comma-separated list. | | $HELM_KUBEASUSER | set the Username to impersonate for the operation. | | $HELM_KUBECONTEXT | set the name of the kubeconfig context. | | $HELM_KUBETOKEN | set the Bearer KubeToken used for authentication. | | $HELM_KUBEINSECURE_SKIP_TLS_VERIFY | indicate if the Kubernetes API server's certificate validation should be skipped (insecure) | | $HELM_KUBETLS_SERVER_NAME | set the server name used to validate the Kubernetes API server certificate | | $HELM_BURST_LIMIT | set the default burst limit in the case the server contains many CRDs (default 100, -1 to disable)| Helm stores cache, configuration, and data based on the following configuration order: - If a HELM_*_HOME environment variable is set, it will be used - Otherwise, on systems supporting the XDG base directory specification, the XDG variables will be used - When no other location is set a default location will be used based on the operating system By default, the default directories depend on the Operating System. The defaults are listed below: | Operating System | Cache Path | Configuration Path | Data Path | |------------------|---------------------------|--------------------------------|-------------------------| | Linux | $HOME/.cache/helm | $HOME/.config/helm | $HOME/.local/share/helm | | macOS | $HOME/Library/Caches/helm | $HOME/Library/Preferences/helm | $HOME/Library/helm | | Windows | %TEMP%\helm | %APPDATA%\helm | %APPDATA%\helm | Usage: helm [command] Available Commands: completion generate autocompletion scripts for the specified shell create create a new chart with the given name dependency manage a chart's dependencies env helm client environment information get download extended information of a named release help Help about any command history fetch release history install install a chart lint examine a chart for possible issues list list releases package package a chart directory into a chart archive plugin install, list, or uninstall Helm plugins pull download a chart from a repository and (optionally) unpack it in local directory push push a chart to remote registry login to or logout from a registry repo add, list, remove, update, and index chart repositories rollback roll back a release to a previous revision search search for a keyword in charts show show information of a chart status display the status of the named release template locally render templates test run tests for a release uninstall uninstall a release upgrade upgrade a release verify verify that a chart at the given path has been signed and is valid version print the client version information Flags: --burst-limit int client-side default throttling limit (default 100) --debug enable verbose output -h, --help help for helm --kube-apiserver string the address and the port for the Kubernetes API server --kube-as-group stringArray group to impersonate for the operation, this flag can be repeated to specify multiple groups. --kube-as-user string username to impersonate for the operation --kube-ca-file string the certificate authority file for the Kubernetes API server connection --kube-context string name of the kubeconfig context to use --kube-insecure-skip-tls-verify if true, the Kubernetes API server's certificate will not be checked for validity. This will make your HTTPS connections insecure --kube-tls-server-name string server name to use for Kubernetes API server certificate validation. If it is not provided, the hostname used to contact the server is used --kube-token string bearer token used for authentication --kubeconfig string path to the kubeconfig file -n, --namespace string namespace scope for this request --registry-config string path to the registry config file (default "/home/kifarunix/.config/helm/registry/config.json") --repository-cache string path to the file containing cached repository indexes (default "/home/kifarunix/.cache/helm/repository") --repository-config string path to the file containing repository names and URLs (default "/home/kifarunix/.config/helm/repositories.yaml") Use "helm [command] --help" for more information about a command.
Install Helm on Kubernetes using Installation Script
Helm provides a script which you can just download and execute to install helm package on your Kubernetes cluster. It provides an automated version of the installation above.
wget https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
The script simply downloads the respective OS helm binary and installs it on your system binary PATH.
You need to have curl or wget installed to use the script.
Once downloaded, execute it to install Helm command line tool;
sudo bash get-helm-3
Install Helm on Kubernetes Cluster from Helm Package Repository
Helm also has created Helm package repository for APT/YUM/DNF and other OS package repos.
On Ubuntu/Debian, you can install Helm on Kubernetes cluster from Helm APT as follows;
sudo apt install apt-transport-https gnupg2 -y
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor \
| sudo tee /etc/apt/trusted.gpg.d/helm.gpg > /dev/null
echo "deb [arch=$(dpkg --print-architecture)] https://baltocdn.com/helm/stable/debian/ all main" | \
sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt update
sudo apt install helm
On Fedora 35+, helm is available on the default repos;
yum install helm
You can also install Helm on CentOS/Oracle/Rocky/RHEL systems fron SNAPD;
sudo yum install epel-release
sudo yum install snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
sudo snap install helm --classic
Check the availability of the package on other OS package repositories!
Install from the Source code
If you want to test the latest pre-release versions of Helm, you can use this method;
Install make
, go
, git
utilities as per your OS package management.
Ubuntu/Debian;
apt install make git
CentOS/RHEL/
yum install make git
Check how to install go.
Then, download and compile Helm;
git clone https://github.com/helm/helm.git
cd helm
make
Move the resulting Helm binary to binaries PATH;
cp bin/helm /usr/local/bin/
Install Helm Official Repositories
You have now successfully installed helm binary on your Kubernetes cluster. You should now be able to install any package/charts from the Helm repository, which can be installed as follows;
helm repo add bitnami https://charts.bitnami.com/bitnami
List helm repositories;
helm repo list
NAME URL
bitnami https://charts.bitnami.com/bitnami
Update the helm repository;
helm repo update
Search for helm charts on Helm Artifact Hub.
helm search hub <keyword>
e.g;
helm search hub wordpress
You will see quite a number of results;
URL CHART VERSION APP VERSION DESCRIPTION https://artifacthub.io/packages/helm/kube-wordp... 0.1.0 1.1 this is my wordpress package https://artifacthub.io/packages/helm/bitnami/wo... 16.1.6 6.2.2 WordPress is the world's most popular blogging ... https://artifacthub.io/packages/helm/shubham-wo... 0.1.0 1.16.0 A Helm chart for Kubernetes https://artifacthub.io/packages/helm/bitnami-ak... 15.2.13 6.1.0 WordPress is the world's most popular blogging ... https://artifacthub.io/packages/helm/truecharts... 2.0.3 6.2.1 The WordPress rich content management system ca... https://artifacthub.io/packages/helm/skywordpre... 0.1.0 1.16.0 A Helm chart for WordPress https://artifacthub.io/packages/helm/groundhog2... 0.8.4 6.2.1-apache A Helm chart for WordPress on Kubernetes https://artifacthub.io/packages/helm/camptocamp... 0.6.10 4.8.1 Web publishing platform for building blogs and ... https://artifacthub.io/packages/helm/devops/wor... 0.12.0 1.16.0 Wordpress helm chart https://artifacthub.io/packages/helm/riftbit/wo... 12.1.16 5.8.1 Web publishing platform for building blogs and ... https://artifacthub.io/packages/helm/sikalabs/w... 0.2.0 Simple WordPress https://artifacthub.io/packages/helm/risserlabs... 0.0.1 latest open source software you can use to create a be... https://artifacthub.io/packages/helm/mcouliba/w... 0.1.0 1.16.0 A Helm chart for Kubernetes https://artifacthub.io/packages/helm/homeenterp... 0.5.0 5.9.3-php8.1-apache Blog server https://artifacthub.io/packages/helm/wordpress-... 6.1.1-3.0rc5 master Lightweight WordPress installation with additio... https://artifacthub.io/packages/helm/wordpress-... 1.0.0 1.1 This is a package for configuring wordpress and... https://artifacthub.io/packages/helm/securecode... 4.0.0-rc.1 4.0 Insecure & Outdated WordPress Instance: Never e... https://artifacthub.io/packages/helm/wordpressm... 1.0.0 This is the Helm Chart that creates the Wordpre... https://artifacthub.io/packages/helm/veilis-hel... 0.12.1999 v0.12.1999 Veilis WordPress Operator Helm Chart https://artifacthub.io/packages/helm/bitpoke/wo... 0.12.2 v0.12.2 Bitpoke WordPress Operator Helm Chart https://artifacthub.io/packages/helm/veilis-hel... 0.12.3999 v0.12.3999 Helm chart for deploying a WordPress site on Ve... https://artifacthub.io/packages/helm/bitpoke/wo... 0.12.4 v0.12.4 Helm chart for deploying a WordPress site on Bi... https://artifacthub.io/packages/helm/kube-wordp... 0.1.0 0.0.1-alpha Helm Chart for WordPress installation on MySQL ... https://artifacthub.io/packages/helm/riotkit-or... 2.1.0-alpha4 v2.1-alpha4 Lightweight WordPress installation with additio... https://artifacthub.io/packages/helm/phntom/bin... 0.0.4 0.0.3 www.binaryvision.co.il static wordpress https://artifacthub.io/packages/helm/gh-shessel... 2.1.12 6.1.1 Web publishing platform for building blogs and ... https://artifacthub.io/packages/helm/sikalabs/w... 0.1.2 https://artifacthub.io/packages/helm/gh-shessel... 5.0.0 6.2.0 Web publishing platform for building blogs and ... https://artifacthub.io/packages/helm/wordpressh... 0.1.0 1.16.0 A Helm chart for Kubernetes https://artifacthub.io/packages/helm/wordpress-... 0.1.0 1.1 this is chart create the wordpress with suitabl... https://artifacthub.io/packages/helm/wordpress-... 0.0.1 Helm Chart for wordpress-gatsby https://artifacthub.io/packages/helm/bitpoke/bi... 1.8.12 1.8.12 The Bitpoke App for WordPress provides a versat... https://artifacthub.io/packages/helm/sonu-wordp... 1.0.0 2 This is my custom chart to deploy wordpress and... https://artifacthub.io/packages/helm/veilis-hel... 1.8.8999 1.8.8999 The Veilis App for WordPress provides a versati... https://artifacthub.io/packages/helm/wordpress/... 0.2.0 1.1.0 Wordpress for Kubernetes https://artifacthub.io/packages/helm/uvaise-wor... 0.2.0 1.1.0 Wordpress for Kubernetes https://artifacthub.io/packages/helm/wordpress-... 1.0.0 2 This is my custom chart to deploy wordpress and... https://artifacthub.io/packages/helm/bitpoke/stack 0.12.4 v0.12.4 Your Open-Source, Cloud-Native WordPress Infras... https://artifacthub.io/packages/helm/veilis-hel... 0.12.3999 v0.12.3999 Your Open-Source, Cloud-Native WordPress Infras... https://artifacthub.io/packages/helm/securecode... 4.0.0-rc.1 v3.8.22 A Helm chart for the WordPress security scanner... https://artifacthub.io/packages/helm/wordpresss... 1.1.0 5.8.2 Web publishing platform for building blogs and ... https://artifacthub.io/packages/helm/viveksahu2... 1.0.0 2 This is my custom chart to deploy wordpress and... https://artifacthub.io/packages/helm/six/wordress 0.2.0 1.1.0 Wordpress for Kubernetes https://artifacthub.io/packages/helm/jinchi-cha... 0.2.0 1.1.0 Wordpress for Kubernetes
To install a helm chart, use the command;
helm install [NAME] [CHART] [flags]
Get more info on;
helm install --help
That concludes our guide on how to install Helm on Kubernetes cluster.
Other Tutorials
Step-by-Step Guide: How to Install Metrics Server on Kubernetes
Easy Way to Install Kubernetes Dashboard on Ubuntu 22.04/20.04