🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
一、链接 https://github.com/kubernetes/dashboard https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/ 二、下载 wget https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta4/aio/deploy/recommended.yaml 三、执行 kubectl apply -f dashboard.yaml 四、执行 kubectl get pods,svc -n kubernetes-dashboard ![](https://img.kancloud.cn/ec/a4/eca47c14c4bebc137a260fe26b8656ab_1177x214.png) ![](https://img.kancloud.cn/33/77/3377069287127f7079063bfe580bb286_1286x216.png) 五、 解决浏览器无法访问问题 https://192.168.254.204:30001/ ![](https://img.kancloud.cn/16/f4/16f4fda5ce0acffcd1f6373874715e21_1365x824.png) --test-type --ignore-certificate-errors ![](https://img.kancloud.cn/a6/f1/a6f1a1d0433ae3c1f6f9dcb38234878a_637x777.png) 六、 创建token 1、上传dashboard-adminuser.yaml ``` apiVersion: v1 kind: ServiceAccount metadata:   name: admin-user   namespace: kubernetes-dashboard --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata:   name: admin-user roleRef:   apiGroup: rbac.authorization.k8s.io   kind: ClusterRole   name: cluster-admin subjects: - kind: ServiceAccount   name: admin-user   namespace: kubernetes-dashboard ``` 2、 kubectl apply -f dashboard-adminuser.yaml 3、 执行授权命令 ``` kubectl -n kubernetes-dashboard describe secret $(kubectl -n kubernetes-dashboard get secret | grep admin-user | awk '{print $1}') ``` eyJhbGciOiJSUzI1NiIsImtpZCI6IkN5T0R2QzR1bFZwcGdxY3A3a29FN3BIRzhURUtoMVFkNGRCa05wckE2c0EifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlcm5ldGVzLWRhc2hib2FyZCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJhZG1pbi11c2VyLXRva2VuLWM0NjlyIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6ImFkbWluLXVzZXIiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiI3YWFlOWNhMi0zOWYwLTQxMGYtOTU5OC1hYzVhNGNmMjIxODUiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6a3ViZXJuZXRlcy1kYXNoYm9hcmQ6YWRtaW4tdXNlciJ9.KBrzR5kdVVanQjMY53lc7MLl3kA\_05WejP29dXliOHVbiSuixSE2RxYZfR7X9fUihDUsyqMZJIGNEzi3DmBytMn\_s9FlJsKkvk8gHysKq-Nq7uBuzKmO5b5kxbeEt3---cUEtGJzRqFZp8ADv3WmgwgY-uPDvxhhHNLv5p75BPZiz-FAdem03sSpRQaqhoIpHyZyrc9aIhqczXrj2VIijF4D5CqeIRp1UK\_M6R4YvtBoUN2ImxWo0OSBM1bMqD628Ukjs1fIk0HSXndPtHx8xZfH8XI7kuSpJPhpy-cwm2f49LbYpDtXGFEzRqhLIEm6NV5pVqBoaYQOap9L1H-OPg 4、 进入页面 ![](https://img.kancloud.cn/d5/0e/d50e5cfbf4db88d20d4773f15560668f_1187x531.png)