The previous article describes the installation of Kubernetes1.10 with Kubeadm, this article we will see Kubernetes dashboard demeanor.
The usual, first introduce the environment:
kubernetes1.10,dashboard1.8.3
There are two ways to access Dashboard in k8s: Kubeconfig (HTTPS) and Token (HTTP) This article first describes the next token method of access.
Token access is no login password, simple and convenient
1. Download the official dashboard Yaml file or download my Yaml (no pit version)
# official Version Https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
# Modified version Https://github.com/gh-Devin/kubernetes-dashboard/blob/master/kubernetes-dashboard.yaml
image:k8s.gcr.io/kubernetes-dashboard-amd64:v1.8.3
Tip: Need a ladder, while modifying the image inside the file for their own usable image, that is, in the previous article let you download to the local k8s related image, here also note that the version must be consistent, otherwise it will error.
Avoid unnecessary errors and pits, suggest that you use my revised version, which has Heapster plugin Yaml and RBAC yaml
Https://github.com/gh-Devin/kubernetes-dashboard
2. Create Pods
Kubectl-n Kube-system create-f.
3. View Pod
Kubectl Get Svc,pod--all-namespaces | grep Dashboard
Note: High-energy, error-prone areas in the front.
If you use the official YAML, you will receive the following error
This is because k8s has enabled RBAC access control policies after version 1.6 and can be configured using the Kubectl or Kubernetes APIs. Using RBAC, you can directly authorize users to have permission to administer permissions, so that you no longer need to touch Master Node in direct contact.
Below teaches you how to solve the above error problem, if you download the official version, modify the ServiceAccount name in the Kubernetes-dashboard.yaml file
146 Serviceaccountname:kubernetes-dashboard-adminkubectl Apply-f Kubernetes-dashboard.yaml-f Kubernetes-dashboard-admin.rbac.yaml
At this point dashboard can use token to access, if you do not modify the dashboard Yaml file inside the IP and port, you can directly access the k8s Master IP address +30090.
Kubernetes1.10 deployment Dashboard and common problems resolution