k8s集群可视化工具安装(dashboard)

avatar
作者
猴君
阅读量:0
  • 可视化安装

2.1、下载相关的yaml文件

wget https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml

Vim recommended.yaml

2.2、部署

kubectl apply -f recommended.yaml

查看那kubernetes-dashboard命令空间下的资源

kubectl get pod,svc -n kubernetes-dashboard

2.3、创建访问账户、获取token令牌

创建账号dashboard-admin

kubectl create serviceaccount dashboard-admin -n kubernetes-dashboard

账号授权,绑定cluster-admin角色

kubectl create clusterrolebinding dashboard-admin --clusterrole=cluster-admin --serviceaccount=kubernetes-dashboard:dashboard-admin

获取账号token

kubectl describe secrets -n kubernetes-dashboard $(kubectl -n kubernetes-dashboard get secret| awk '/dashboard-admin/ {print $1}')

2.4、访问 https://192.168.11.240:30009

广告一刻

为您即时展示最新活动产品广告消息,让您随时掌握产品活动新动态!