Installing Helm on an AKS Kubernetes cluster

In this guide I show you how to install the Kubernetes package manager helm on your cluster.

What you need:

  • Up and running Kubernetes cluster
  • Set up kubectl

Let’s start

After we have connected to our cluster (in Azure you can use

az aks get-credentials --resource-group <RESOURCEGROUPNAME> --name <CLUSTERNAME>

to let azure-cli handle the configuration for you. To check if everything is running smooth you can use kubectl get nodes. If it returns the nodes you are good to go.

The first step is to install the helm client on your local machine. The problem is that everybody uses a different operating system or have different preferences on how to access his/her cluster, so I encourage you to go to helm’s website and download it yourself.

After that is done, we can initialize helm on our cluster:

helm init --history-max 200 

RBAC

Because we have RBAC enabled we need to create a service account for tiller that allows it to access the cluster resources:

kubectl create serviceaccount --namespace kube-system tiller

After that we need to bind that new service account to a role that gives tiller access to the whole cluster:

kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller

Now the tiller pod can be deployed:

kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller“}}}}‘

Finally we are ready to go to use helm to deploy applications on our cluster!

comments powered by Disqus