[root@k8s-master uid]# ll
total 12
-rw-r--r-- 1 root root 1148 Oct 6 11:18 dashboard-deployment.yaml
-rw-r--r-- 1 root root 612 Oct 6 11:18 dashboard-rbac.yaml
-rw-r--r-- 1 root root 338 Oct 6 11:18 dashboard-service.yaml
[root@k8s-master uid]# kubectl create -f dashboard-rbac.yaml
serviceaccount "kubernetes-dashboard" created
clusterrolebinding "kubernetes-dashboard-minimal" created
[root@k8s-master uid]# kubectl create -f dashboard-deployment.yaml
deployment "kubernetes-dashboard" created
[root@k8s-master uid]# kubectl create -f dashboard-service.yaml
service "kubernetes-dashboard" created
[root@k8s-master uid]# ll
total 12
-rw-r--r-- 1 root root 1148 Oct 6 11:18 dashboard-deployment.yaml
-rw-r--r-- 1 root root 612 Oct 6 11:18 dashboard-rbac.yaml
-rw-r--r-- 1 root root 338 Oct 6 11:18 dashboard-service.yaml
[root@k8s-master uid]# kubectl get service -n kube-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes-dashboard NodePort 10.10.10.239 <none> 80:46542/TCP 13s
[root@k8s-master uid]#