fix RBAC permissions in kube-system:default
See issues in kubernetes/minikube#1722
@@ -22,6 +22,7 @@ echo "installing minikube"
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v${MINIKUBE_VERSION}/minikube-linux-amd64
chmod +x minikube
mv minikube bin/
+minikube addons disable dashboard
echo "starting minikube with RBAC"
sudo CHANGE_MINIKUBE_NONE_USER=true $PWD/bin/minikube start --vm-driver=none --kubernetes-version=v${KUBE_VERSION} --extra-config=apiserver.Authorization.Mode=RBAC
@@ -34,6 +35,9 @@ until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do
done
kubectl get nodes
+# create clusterrolebinding needed for RBAC
+kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
+
echo "installing helm"
curl -ssL https://storage.googleapis.com/kubernetes-helm/helm-v2.7.2-linux-amd64.tar.gz \
| tar -xz -C bin --strip-components 1 linux-amd64/helm
@@ -43,7 +47,6 @@ kubectl --namespace kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
-
echo "waiting for tiller"
kubectl --namespace=kube-system rollout status --watch deployment/tiller-deploy
