<p>I have installed Rancher 2 and created a kubernetes cluster of internal vm's ( no AWS / gcloud).</p>

<p>The cluster is up and running.</p>

<p>I logged into one of the nodes.     </p>

<p>1) Installed Kubectl and executed kubectl cluster-info . It listed my cluster information correctly.</p>

<p>2) Installed helm </p>

<pre><code>curl https://raw.githubusercontent.com/helm/helm/master/scripts/get &gt; get_helm.sh
chmod 700 get_helm.sh
./get_helm.sh

root@lnmymachine # helm version
Client: &amp;version.Version{SemVer:"v2.12.3", GitCommit:"eecf22f77df5f65c823aacd2dbd30ae6c65f186e", GitTreeState:"clean"}
Server: &amp;version.Version{SemVer:"v2.12.3", GitCommit:"eecf22f77df5f65c823aacd2dbd30ae6c65f186e", GitTreeState:"clean"}
</code></pre>

<p>3) Configured helm referencing <a href="https://rancher.com/docs/rancher/v2.x/en/installation/ha/helm-init/" rel="noreferrer">Rancher Helm Init</a></p>

<pre><code>kubectl -n kube-system create serviceaccount tiller

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

helm init --service-account tiller
</code></pre>

<p>Tried installing Jenkins via helm</p>

<pre><code>root@lnmymachine # helm ls
Error: Unauthorized
root@lnmymachine # helm install --name initial stable/jenkins
Error: the server has asked for the client to provide credentials
</code></pre>

<p>Browsed similar issues and few of them were due to multiple clusters. I have only one cluster. kubectl gives all information correctly.</p>

<p>Any idea whats happening. </p>

<p>It seems there is a mistake while creating the <code>ClusterRoleBinding</code>:</p>

<p>Instead of <code>--clusterrole cluster-admin</code>, you should have <code>--clusterrole=cluster-admin</code></p>

<p>You can check if this is the case by verifying if ServiceAccount, ClustrerRoleBinding were created correctly.</p>

<p><code>kubectl describe -n kube-system sa tiller</code></p>

<p><code>kubectl describe clusterrolebinding tiller</code></p>

<p>Seems like they have already fixed this on <a href="https://rancher.com/docs/rancher/v2.x/en/installation/ha/helm-init/" rel="nofollow noreferrer">Rancher Helm Init</a> page.</p>
