Setup Kubernetes dashboard
标签:
Kubernetes
Setup the service
docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/kubernetes-dashboard-amd64:v1.8.3docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/kubernetes-dashboard-amd64:v1.8.3 k8s.gcr.io/kubernetes-dashboard-amd64:v1.8.3git clone https://github.com/kubernetes/dashboardkubectl apply -f ./src/deploy/recommended/kubernetes-dashboard.yaml
Make the service accessible
kubectl -n kube-system edit svc/kubernetes-dashboard
Change .spec.type to NodePort. And then use kubectl -n kube-system get svc/kubernetes-dashboard
to get the external port number of dashboard. Then use https://<Kube Master IP>:<port>/ to access the dashboard.
Get Tokens for cluster admin
kubectl -n kube-system get secret|grep admin-token kubectl -n kube-system get secret admin-token-<your id> -o jsonpath={.data.token}|base64 -d
Get Tokens for default namespace
kubectl create rolebinding default-admin --clusterrole=admin --serviceaccount=default:default --namespace=defaultkubectl get secret | grep default-token kubectl get secret default-token-<your id> -o jsonpath={.data.token}|base64 -d
作者:frameyl
链接:https://www.jianshu.com/p/d2f97824453e
点击查看更多内容
为 TA 点赞
评论
共同学习,写下你的评论
评论加载中...
作者其他优质文章
正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦