<p>Trying to access Kubernetes dashboard (Azure AKS) by using below command but getting error as attached.</p>
<pre><code>az aks browse --resource-group rg-name --name aks-cluster-name --listen-port 8851
</code></pre>
<p><a href="https://i.stack.imgur.com/IRLRB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IRLRB.jpg" alt="Kubernetes dashboard browing error" /></a></p>

KRM
<p>Please read AKS documentation of how to authenticate the dashboard from <a href="https://learn.microsoft.com/en-us/azure/aks/kubernetes-dashboard" rel="nofollow noreferrer">link</a>. This also explains about how to enable the addon for newer version of k8s also.</p>
<p>Pasting here for reference</p>
<p><strong>Use a kubeconfig</strong></p>
<p>For both Azure AD enabled and non-Azure AD enabled clusters, a kubeconfig can be passed in. Ensure access tokens are valid, if your tokens are expired you can refresh tokens via kubectl.</p>
<ol>
<li>Set the admin kubeconfig with <code>az aks get-credentials -a --resource-group &lt;RG_NAME&gt; --name &lt;CLUSTER_NAME&gt;</code></li>
<li>Select <code>Kubeconfig</code> and click <code>Choose kubeconfig file</code> to open file selector</li>
<li>Select your kubeconfig file (defaults to $HOME/.kube/config)</li>
<li>Click Sign In</li>
</ol>
<p><strong>Use a token</strong></p>
<ol>
<li>For non-Azure AD enabled cluster, run <code>kubectl config view</code> and copy the token associated with the user account of your cluster.</li>
<li>Paste into the token option at sign in.</li>
<li>Click Sign In</li>
</ol>
<p>For Azure AD enabled clusters, retrieve your AAD token with the following command. Validate you've replaced the resource group and cluster name in the command.</p>
<pre><code>kubectl config view -o jsonpath='{.users[?(@.name == &quot;clusterUser_&lt;RESOURCE GROUP&gt;_&lt;AKS_NAME&gt;&quot;)].user.auth-provider.config.access-token}'
</code></pre>
