How to install Helm into a Kubernetes cluster

- 2 min read

Helm is a great tool for managing releases to Kubernetes clusters, this guide aims to help you setup Helm with Tiller in your cluster.

Before you proceed with setting up Helm, you should already have a Kubernetes cluster and kubectl installed. If you don’t have that yet, you can follow my How to setup Minikube with KVM on Ubuntu guide.

As always with Kubernetes commands—especially when doing something like installing Tiller—make sure you’re affecting the correct cluster by running kubectl config current-context

Install Helm

Originally, I wanted to install Helm with Snap. However there is an issue with Snap not being able to read Kubernetes configuration. While we can work around this, the solution becomes heavily dependent on what is contained within your kubernetes config.

Instead we’ll proceed with the official script provided by the Helm project.

curl -o get_helm.sh https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get
chmod +x get_helm.sh
# Be prepared to be asked for sudo to copy the binary into /usr/local/bin
./get_helm.sh

Then remove the install script: rm get_helm.sh

Or… if danger is your middle name, just pipe the script straight into bash:

curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash

Initialize Helm and install Tiller

Next we want to initialize Helm and install Tiller:

helm init --wait --upgrade

The --wait flag ensures that the helm init command does not return until after Tiller is ready within the cluster. Attempting to use Helm before Tiller is ready has brought my team a lot of headaches, so this flag is a life saver.

The --upgrade flag won’t be needed for your first install, however if you’re like me, it’s likely you’ll re-run this command in the future and it doesn’t hurt on a first install.

Bash completions

To install bash completions (so you don’t go insane trying to remember command arguments), run:

helm completion bash | sudo tee /etc/bash_completion.d/helm

Then to add these bash completions your current terminal session:

source <(helm completion bash)