Official website link
https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/
First, install the master
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml
kubectl apply -f
recommended.yaml
Note: The default port official is not exposed to the outside, we ourselves set the following
nodePort: 30001
or
use our ready yaml
kubectl apply -f
dashboard.yaml
Second, see POD
kubectl GET PODS -n-Kubernetes Dashboard
following output
NAME RESTARTS of AGE the STATUS READY
Dashboard-metrics 76585494d8-Scraper-Running-sbzjv 1/1 0 2m6s
Kubernetes 5996555fd8-Dashboard-2-fc7zf 1/1 Running 2m6s
III. View port
kubectl get pods,svc -n kubernetes-dashboard
The following output
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/dashboard-metrics-scraper ClusterIP 10.0.0.8 <none> 8000/TCP 16m
service/kubernetes-dashboard NodePort 10.0.0.88 <none> 443:30001/TCP 16m
service/dashboard-metrics-scraper ClusterIP 10.0.0.8 <none> 8000/TCP 16m
service/kubernetes-dashboard NodePort 10.0.0.88 <none> 443:30001/TCP 16m
Fourth, access control panel
Use any node to access node IP + port
Fifth, we see a successful visit
We use the token way to log on, create a service account and bind default cluster cluster-admin administrator role
Sixth, we prepared yaml download files, execute
kubectl apply -f
Dashboard-adminuser.yaml
Seven, get token
kubectl -n kubernetes-dashboard describe secret $(kubectl -n kubernetes-dashboard get secret | grep admin-user | awk '{print $1}')
Eight, you can fill in the login screen access token