Kubernetes1.15部署Dashboard

网友投稿 249 2022-09-08

Kubernetes1.15部署Dashboard

=== master节点上进行如下操作 ===

部署方法1-原生文件部署:

kubectl apply -f -i 's/k8s.gcr.io/国内可访问镜像地址/g' kubernetes-dashboard.yaml

修改端口

sed -i '/targetPort:/a\ \ \ \ \ \ nodePort: 50001\n\ \ type: NodePort' kubernetes-dashboard.yaml

本地执行部署Dashboard

kubectl create -f kubernetes-dashboard.yaml

检查相关服务运行状态

kubectl get deployment kubernetes-dashboard -n kube-systemkubectl get pods -n kube-system -o widekubectl get services -n kube-systemnetstat -ntlp|grep 50001

浏览器访问

浏览器输入Dashboard访问地址:​​create serviceaccount dashboard-admin -n kube-systemkubectl create clusterrolebinding dashboard-admin --clusterrole=cluster-admin --serviceaccount=kube-system:dashboard-admin

查看访问Dashboard的认证令牌

[root@kubm-01 ~]# kubectl describe secrets -n kube-system $(kubectl -n kube-system get secret | awk '/dashboard-admin/{print $1}')

Name: dashboard-admin-token-x5qt8Namespace: kube-systemLabels: Annotations: kubernetes.io/service-account.name: dashboard-admin kubernetes.io/service-account.uid: 24900572-5faf-4ea5-b343-829517f5b871Type: kubernetes.io/service-account-tokenData====ca.crt: 1025 bytesnamespace: 11 bytestoken: eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJkYXNoYm9hcmQtYWRtaW4tdG9rZW4teDVxdDgiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC5uYW1lIjoiZGFzaGJvYXJkLWFkbWluIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQudWlkIjoiMjQ5MDA1NzItNWZhZi00ZWE1LWIzNDMtODI5NTE3ZjViODcxIiwic3ViIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50Omt1YmUtc3lzdGVtOmRhc2hib2FyZC1hZG1pbiJ9.vvLlroVjuZ42m5E4ywT_vPLElfUPN67R0xu4GcbomTNyzjYic6SCsNxo-I-uIRuVtSu-O-cv2ECdLeshApzsZEc9Wr23XTdb8lHT3yHvXuT3o7SRPl74YxUcxRvW19H7O4RMQ4Y5Mu4j-W4QAsS7Y6yMphLijre60qlaE5-yDwm0VnXBg59AbVlIaTnya8VChp7sEHXNPORcdqvonMVojkJitH8567AD1mxb94m1eL3OU8CrN_UHZhWLvU27VSzdwCL6SIwUi8iy18uOvH-3_HFJs93Wt48LwfgDD0xNioDdkDiO7qr9qbpttNUWCXKnfpY3Jyk0UreBtP8VHUBJwg

输入token

项目地址

​​https://github.com/kubernetes/dashboard​​

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:仙人JUMP:再不开火锅店,明星就饿死了!
下一篇:Cassandra集群管理-节点异常重启
相关文章

 发表评论

暂时没有评论,来抢沙发吧~