简体   繁体   中英

Azure k8s dashboard does not open

I have k8s cluster on Azure and can not access the dashboard. To access it I was doing aks browse --resource-group <res_group> --name <cluster_name> It does not open after accidentally deleted the kube-dashboard pod.

Error: Couldn't find the Kubernetes dashboard pod.

Did try to enable-disbale dashboard add-on on Azure. Re-install k8s-dashboard. (Azure did not allow)

Any ideas on how to solve the issue and restart the dashboard?

Did find the following solution that worked for me:

  1. Created another Azure k8s cluster. For each cluster Azure makes a dashboard deployment.

  2. Copied the yaml files with the command: kubectl get deployment -n kube-system <kubernetes-dasboard-xxx> for each "deployment, replicaSet, service and pod related to dashboard"

  3. Recreated them into the old not working cluster.

  4. Upgraded-downgraded the cluster version to re-deploy the objects.

Depends on your k8s version, AKS doesn't enable dashboard while creating a new cluster. You can find details in below link.

https://docs.microsoft.com/en-us/azure/aks/kubernetes-dashboard

And I suggest you, can directly install dashboard from kubernetes dashboard page, it is installing dashboard another namespace(it it better actually) and you can create and RBAC account to see all resources as an admin privileges.

https://github.com/kubernetes/dashboard https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/creating-sample-user.md

And also you can use --enable-addons
https://docs.microsoft.com/en-us/azure/aks/kubernetes-dashboard

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM