A lot of posts describe how to do this, but are fairly outdated, and do not mention the last supported K8s version. Here’s a tried and tested way to do so via Helm. This has been tested on GKE, with the Kubernetes master version 1.9.7-gke.6:
-
- Create the service account for Tiller – the Helm server
$ kubectl create serviceaccount --namespace kube-system tiller
- Create the cluster role
$ kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kibe-system:tiller
- Apply the RBAC role
- Create tiller.yml with the following content
kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1beta1 metadata: name: tiller-clusterrolebinding subjects: - kind: ServiceAccount name: tiller namespace: kube-system roleRef: kind: ClusterRole name: cluster-admin apiGroup: ""
- Apply this
$ kubectl create -f tiller.yaml
- Create tiller.yml with the following content
- Initialise Helm
helm init --service-account tiller --upgrade
- Wait until the tiller-deploy service is running
$ while ! kubectl get pod -n kube-system | grep tiller-deploy | grep Running &> /dev/null; do echo "Waiting for the tiller-deploy pod to be ready..." sleep 1 done
- Install the Nginx Ingress Controller
helm install --name nginx-ingress stable/nginx-ingress --set rbac.create=true
- Have fun!
- Create the service account for Tiller – the Helm server
Inspired from Bitnami.
Read the ongoing issue here.