1. 程式人生 > >CentOS7.5Kubernets(k8s)1.12.2之Helm部署Dashboard(三)

CentOS7.5Kubernets(k8s)1.12.2之Helm部署Dashboard(三)

Helm部署Dashboard
dashboard所需映象(v1.10.0)地址:
連結:https://pan.baidu.com/s/1vkdYNGjQD0hD_Q0_I_2t3A
提取碼:7i7k
1、#helm install --name dashboard --namespace=kube-system stable/kubernetes-dashboard
2、#kubectl edit svc dashboard-kubernetes-dashboard -n kube-system (將ClusterIP改為NodePort,提供外網訪問地址)
3、#kubectl create serviceaccount dashboard-admin -n kube-system (利用token訪問K8s的dashboard)
4、#kubectl create clusterrolebinding dashboard-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:dashboard-admin
5、#kubectl get secret -n kube-system
6、#kubectl describe secret dashboard-admin-token-xxxxx -n kube-system (查詢Doshboard的token是多少)
備註:用火狐瀏覽器進行訪問