Deploy Kubernetes Dashboard
Dashboard is an open source Web project of the Kubernetes community. You can deploy updated applications, troubleshoot application failures, and manage Kubernetes cluster resources through Dashboard. In addition, Dashboard also provides information on the cluster status and error logs. Here we will introduce how to deploy and access DashBoard on UK8S.
Deploy Dashboard
UK8S cluster does not install Dashboard by default. If you want to experience the native Dashboard of the community, you need to install it yourself. For details, you can refer to official document. If you execute the following command to install Dashboard, the image used has removed the certificate restriction of Https.
Dashboard v1.10.0
Recommended for Kubernetes 1.12 and below
kubectl apply -f https://docs.ucloud-global.com/uk8s/yaml/service/dashboard.v1.10.0.yaml
Official compatibility tips
Kubernetes version | 1.8 | 1.9 | 1.10 | 1.11 | 1.12 | 1.13 |
---|---|---|---|---|---|---|
compatibility | ✓ | ✓ | ✓ | ? | ? | × |
- ✓ Fully supported version range.
- ? Due to the changes between Kubernetes API versions, some features may not work normally (The test has not covered completely).
- × Unsupported version range.
Dashboard v2.0.0-rc1
Recommended for Kubernetes 1.13 and above
kubectl apply -f https://docs.ucloud-global.com/uk8s/yaml/service/dashboard.v2.0.0-rc1.yaml
Official compatibility tips
Kubernetes version | 1.12 | 1.13 | 1.14 | 1.15 | 1.16 |
---|---|---|---|---|---|
compatibility | ? | ? | ? | ? | ✓ |
- ✓ Fully supported version range.
- ? Due to the changes between Kubernetes API versions, some features may not work normally (The test has not covered completely).
- × Unsupported version range.
You can access or download this yaml file. This yaml file exposes services using external network ULB, which will generate additional EIP costs.
Service access type is HTTP, if you want to use HTTPS, please purchase SSL certificate first.
Dashboard v3.0.0
- http
kubectl apply -f https://docs.ucloud-global.com/uk8s/yaml/service/dashboard-http.v3.0.0.yaml
- https
kubectl apply -f https://docs.ucloud-global.com/uk8s/yaml/service/dashboard-https.v3.0.0.yaml
Kubernetes version | 1.22 | 1.23 | 1.24 | 1.25 | 1.26 |
---|---|---|---|---|---|
compatibility | ? | ? | ? | ✓ | ? |
- ✓ Fully supported version range.
- ? Due to the changes between Kubernetes API versions, some features may not work normally (The test has not covered completely).
- × Unsupported version range.
Access Dashboard
In the above example, we created a service of type LoadBalancer, which can access Dashboard directly through the external IP of the Service (actually the external IP of ULB).
After obtaining the external IP, we directly enter the IP in the browser and arrive at the login page. Both kubeconfig and token are supported. Here we choose Token authentication method. Copy the obtained token to the input box, click login, and then you can start using Dashboard.
Note: When using chrome to log in, a certificate error will be reported. Click advanced to enter (Mac computer needs to blindly type “thisisunsafe” on the keyboard)
Dashboard v1.10.0
Check EIP
kubectl get svc -n kube-system | grep kubernetes-dashboard-http
Check TOKEN
kubectl describe secret dashboard-ui -n kube-system
Dashboard v2.0.0-rc1
Check EIP
kubectl get svc -n kubernetes-dashboard | grep kubernetes-dashboard
Check TOKEN
kubectl describe secret -n kubernetes-dashboard kubernetes-dashboard-token
Dashboard v3.0.0
http
- The http method only supports local access
kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard 8080:80
Check TOKEN
kubectl describe secret -n kubernetes-dashboard kubernetes-dashboard-token
1.24 and above check token
- Get the access token. Here, the sa kubernetes-dashboard under kubernetes-dashboard has created a token. —duration represents the token validity period.
kubectl -n kubernetes-dashboard create token kubernetes-dashboard --duration=1h
https
- Get external ULB address
kubectl -n kubernetes-dashboard get svc kubernetes-dashboard --output jsonpath="{.status.loadBalancer.ingress[*]['ip']}"