Is it possible to access kubernetes dashboard directly in browser in Azure Kuberenetes Service (AKS) (without additional commands)

7/17/2019

When I run kubectl cluster-info in AKS I get this:

kubernetes-dashboard is running at https://clusterUrl/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy

This url is reachable in browser, but only returns 401.

I am wondering if it is possible to log in to Azure in some way so that this url is accessible? Would be quite convenient to access it directly.

-- Ilya Chernomordik
azure-kubernetes
kubernetes

1 Answer

7/17/2019

using kubectl proxy, you can access the dashboard

[root@ae740dbd82bf /]# kubectl proxy
Starting to serve on 127.0.0.1:8001

open your browser and navigate to http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

If you want to access it externally then you have two choices

  1. define service port as NodePort. Then you would be able to access dashboard on any CLUSTER_HOST:NODEPORT
  2. Deploy an ingress controller and define a rule between the dashboard dns and the dashboard kubernetes service
-- P Ekambaram
Source: StackOverflow