k8s部署官方dashboard
k8s有一个官方dashboard,方便图形化操作界面。
·
1,下载推荐配置
wget https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml
2,修改recommended.yaml
svc以Nodeport形式暴露出来
3,部署
kubectl create -f recommended.yaml
4,查看资源
kubectl get pod,svc -n kubernetes-dashboard -o wide
5,创建账户,获取访问token
kubectl create serviceaccount dashboard-admin -n kubernetes-dashboard
6,授权
kubectl create clusterrolebinding dashboard-admin-rb --clusterrole=cluster-admin --serviceaccount=kubernetes-dashboard:dashboard-admin
7,查看token
kubectl get secrets -n kubernetes-dashboard | grep dashboard-admin
kubectl describe secrets dashboard-admin-token-k9npv -n kubernetes-dashboard
8,访问
https://192.168.199.100:30009/#/login
选token
如果chrome报连接问题的话,用edge试试。另外要允许cookies
更多推荐
已为社区贡献7条内容
所有评论(0)