可视化安装
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
|----------------------------------------------------------------------------|
| |
| |