1

The command fails due to credentials problems, but when you test with kubectl get nodes everything looks fine.

Output of helm install:

⋊> ~/t/mtltech on master ⨯ helm install --name nginx-ingress stable/nginx-ingress --set rbac.create=true                                                                                                   00:31:41
Error: the server has asked for the client to provide credentials

Output of kubectl get nodes:

⋊> ~/t/mtltech on master ⨯ kubectl get nodes                                                                                                                                                               00:37:41
NAME                                       STATUS    ROLES     AGE       VERSION
gke-mtltech-default-pool-977ee0b2-5lmi   Ready     <none>    7h        v1.11.7-gke.4
gke-mtltech-default-pool-977ee0b2-hi4v   Ready     <none>    7h        v1.11.7-gke.4
gke-mtltech-default-pool-977ee0b2-mjiv   Ready     <none>    7h        v1.11.7-gke.4

Output of helm version:

Client: &version.Version{SemVer:"v2.13.0", GitCommit:"79d07943b03aea2b76c12644b4b54733bc5958d6", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.13.0", GitCommit:"79d07943b03aea2b76c12644b4b54733bc5958d6", GitTreeState:"clean"}

Output of kubectl version:

Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"clean", BuildDate:"2018-11-26T14:38:32Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.7-gke.4", GitCommit:"618716cbb236fb7ca9cabd822b5947e298ad09f7", GitTreeState:"clean", BuildDate:"2019-02-05T19:22:29Z", GoVersion:"go1.10.7b4", Compiler:"gc", Platform:"linux/amd64"}

Cloud Provider: Google Cloud

I've tried to reset it several times with rm -rf ~/.helm && helm init --service-account tiller but it doesn't change anything.

Any idea ? Thanks.

1 Answer 1

2

The problem here is the Tiller. I do not know how you deployed Helm and Tiller, but the mistake was there.

I used this chart and all works correctly, then I deleted my service account and cluster role binding and I met the same error - deleting only cluster role binding gives error:

Error: release nginx-ingress failed: namespaces "default" is forbidden: User "system:serviceaccount:kube-system:tiller" cannot get namespaces in the namespace "default"

So the error is due to missing Service Account or both.

Solution for this: rm -rf ~/.helm

kubectl create serviceaccount tiller --namespace kube-system

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

helm init --service-account=tiller

kubectl get pods -n kube-system

check the full name of tiller pod:

kubectl delete pod -n kube-system tiller-deploy-xxx

Wait till the tiller pod will be redeployed and install your helm chart:

helm install --name nginx-ingress stable/nginx-ingress --set rbac.create=true

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.