This post explains the steps to install helm 3 on kubernetes and install helm charts for managing and deploying applications on the Kubernetes cluster.
You should have the following before getting started with the helm setup.
- A running Kubernetes cluster.
- The Kubernetes cluster API endpoint should be reachable from the machine you are running helm.
- Authenticate the cluster using kubectl and it should have cluster-admin permissions.
Install Helm 3 – Using Script
I recommend this method if you are setting up a test environment in your local workstation or a server. For project requirements, please follow the binary installation of the specific version that is explained in the next section.
Note: The workstation you are running should have the kubectl context set to the cluster you want to manage with Helm.
Step 1: Download the latest helm 3 installation script.
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
Step 2: Add execute permissions to the downloaded script.
chmod +x get_helm.sh
Step 3: Execute the installation script. This script will automatically find the right binary for your system.
Step 4: Validate helm installation by executing the helm command.
Install Helm 3 From Binary
This method is recommended for project requirements where you can have a specific version of helm installed across all the environments.
For example, if you are using Jenkins for Helm deployments, ensure the Jenkins agent where the helm command runs have kubectl configured with admin permissions.
Step 1: Head over to the Github helm release page and copy the Linux amd64 link for the required version.
Step 2: Download the binary using wget.
wget -O helm.tar.gz https://get.helm.sh/helm-v3.5.4-linux-amd64.tar.gz
Step 3: Untar the downloaded file.
tar -zxvf helm.tar.gz
Step 4: Move the helm executable to the bin directory.
sudo mv linux-amd64/helm /usr/local/bin/helm
Step 5: Validate by executing the helm command.
Install Helm From Package Managers
brew install helm
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null sudo apt-get install apt-transport-https --yes 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 sudo apt-get update sudo apt-get install helm
# For Scoop scoop install helm #For Chocolatey choco install kubernetes-helm
Add Stable Helm Repo
The Helm repo contains the stable helm charts developed and maintained by the community.
Now, add the public stable helm repo for installing the stable charts.
helm repo add stable https://charts.helm.sh/stable
You can search the available chart using the search command. For example, if you want to set up Jenkins on Kubernetes, you can search for Jenkins chart using the following command.
helm search repo jenkins
Alternatively, you can search for stable community charts via artifacthub.com. Here you can find many community-contributed helm charts.
Install & Validate Helm Chart
To validate the helm setup let’s set up the Nginx ingress controller using the helm chart available in Artifacthub.
Step 1: First add the nginx-ingress helm repo.
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
Step 2: Update the chart repo.
helm repo update
Step 3: Let’s install a stable Nginx chart and test the setup. The ingress controller gets deployed in the default namespace.
helm install ingress-controller ingress-nginx/ingress-nginx
ingress-controller is the custom release name. You can give the name of your preference.
Step 4: Now, check the status of the ingress helm deployment using the following command. It should show the status of the deployment.
Alternatively, you can use the kubectl command to check the ingress deployment in the default namespace.
kubectl get deployments
Step 4: Now, to remove the deployment after validation, all you have to do is uninstall the deployment using its release name.
helm uninstall ingress-controller
In this post, we have seen how to install helm 3, install char repo and validate a sample helm deployment.
When you use helm for project use cases, it is recommended you create your own helm charts with approved images from the security team.
If you use community helm charts in project environments, ensure you replace the community images with custom build images.
Next look at the comprehensive beginner’s guide on how to create Helm chart. It covers the helm chart development and its best practices using step-by-step guides.
Ho do i install helm dashboard?.
I need to uninstall helm3 from cluster, how can i do that?
Helm 3 is a client binary. You don’t have to uninstall anything from the Kubernetes cluster. Only in Helm2, there was this concept of tiller where you have to delete the tiller deployment.
This worked great, thanks a lot!
With the command
> helm repo list
one can list all repos in helm. I think this would be useful to add here. I am also new to k8s and helm and these sort of commands are helpful to learn and to double check.
Hi, how do i uninstall helm? some how i installed v2.16.5 and i want to remove it. Any idea?