<p>How do you apply already create clusterrolebindings to a cluster in Azure Kubernetes?</p>

<p>I have a new cluster and I'm trying to open and view it in the browser, but I am getting forbidden errors.</p>

<p>I tried to run this script, but the terminal says I've already created it. Now I don't know how to apply it to this cluster. Is there a way to do this in the Azure GUI? Any help or suggestions would be great. Thanks!!</p>

<pre><code>az aks get-credentials --resource-group myAKScluster --name myAKScluster --admin

kubectl create clusterrolebinding kubernetes-dashboard --clusterrole=cluster-admin --serviceaccount=kube-system:kubernetes-dashboard

az aks browse --resource-group myAKScluster --name myAKScluster
</code></pre>

<p><a href="https://i.stack.imgur.com/7AwLE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7AwLE.png" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/AjCsf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AjCsf.png" alt="enter image description here"></a></p>

notech214
<p>It because that you enable the RBAC of your AKS cluster and access to it has been disabled by default. You can follow the <strong>troubleshooting</strong> described <a href="https://learn.microsoft.com/en-us/azure/aks/troubleshooting#i-created-a-cluster-with-rbac-enabled-by-using-either-the-azure-cli-with-defaults-or-the-azure-portal-and-now-i-see-many-warnings-on-the-kubernetes-dashboard-the-dashboard-used-to-work-without-any-warnings-what-should-i-do" rel="nofollow noreferrer">here</a> and the <strong>solution</strong> <a href="https://pascalnaber.wordpress.com/2018/06/17/access-dashboard-on-aks-with-rbac-enabled/" rel="nofollow noreferrer">here</a>.</p>
