玩会Dashboard部署
步骤:
-
下载yaml,并运行Dashboard
wget https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml
修改:vim修改recommended.yaml后,就能在集群外部访问dashboard
-
部署
查看namespace下的kubernetes-dashboard下的资源
-
创建访问账户,获取token
1)创建账号
kubectl create serviceaccount dashboard-admin -n kubernetes-dashboard
2)授权
kubectl create clusterrolebinding dashboard-admin-rb --clusterrole=cluster-admin --serviceaccount=kubernetes-dashboard:dashboard-admin
3)获取账号token