System environment:
CentOS 7 64 bit
Ready to work:
Three CentOS server to create a virtual machine, you can refer to the previous article
192.168.28.128 --master
192.168.28.130 --node01
192.168.28.131 --node02
installation steps:
1. Execute the statement deployment
- Execute the following statement to open in case of vpn (to be modified)
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml
amend as below:
kind: spec position in Service
. A increase "type: NodePort", with ports at the same level directory
Increasing the b.ports directory "nodePort: 30001", and targetPort directory at the same level
- If there is no vpn following statement is executed (already modified good)
$ kubectl apply -f http://res.chinaskinhospital.com/Upload/Academic/20191219/2019121918412312049088.yaml
2. Use the browser (Firefox) to access any node can open the format: https: // IP address of any node: 300001
https://192.168.28.128:30001
https://192.168.28.130:30001
https://192.168.28.131:30001
3. Access Token
$ kubectl create serviceaccount dashboard-admin -n kube-system
$ kubectl create clusterrolebinding dashboard-admin --clusterrole=cluster-admin --serviceaccount=kube-system:dashboard-admin
$ kubectl describe secrets -n kube-system $(kubectl -n kube-system get secret | awk '/dashboard-admin/{print $1}')
4.使用令牌的方式登录
5.登录成功