Kubernetes v1.10----Deployment Kubernetes-dashboard v1.83
1. Download Kubernetes-dashboard yaml file
#因为文件中的image指定的是谷歌, so you cannot deploy directly using apply
wget Https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
Modify Iamge
Kubernetes-dashboard.yaml
.... Spec: serviceaccountname:kubernetes-dashboard containers: -Name:kubernetes-dashboard
....
Wq Save
2. Edit the Kubernetes-rbac.yaml file for subsequent user authentication
ApiVersion:v1kind:ServiceAccountmetadata: name:kubernetes-dashboard namespace:kube-system---kind: Clusterrolebindingapiversion:rbac.authorization.k8s.io/v1beta1metadata: name:kubernetes-dashboardsubjects: -Kind:serviceaccount name:kubernetes-dashboard namespace:kube-systemroleref: kind:clusterrole name:cluster-admin ApiGroup:rbac.authorization.k8s.io
3. Add Users
Vim/etc/kubernetes/pki/basic_auth_file
4. Modify the Kube-apiserver configuration
Vim/etc/kubernetes/manifests/kube-apiserver.yaml
Spec: containers: -command: -kube-apiserver ... ---anonymous-auth=false ---insecure-bind-address=127.0.0.1 ---insecure-port=8080 --- Basic-auth-file=/etc/kubernetes/pki/basic_auth_file... livenessprobe: failurethreshold:8 HttpGet: 127.0.0.1 path:/healthz 8080 scheme:http
5. Restart the service
Systemctl Restart Kubelet
Verify that the service is working
6. Installing Dashboard
Execute separately
Kubectl apply-f kubernetes-dashboard.yamlkubectl apply-f kubernetes-rbac.yamlkubectl Create clusterrolebinding Login-dashboard-admin--clusterrole=cluster-admin--user=admin
7. See if the service is running
8. Access
https://master:6443/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/
10. Login Verification
Enter just our user name in the file: admin password: admin Click Login, success.
Kubernetes v1.10----Deployment Kubernetes-dashboard v1.83