登录
- 获取token
1 | kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | awk '/^deployment-controller-token-/{print $1}') | awk '$1=="token:"{print $2}' |
1 | kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep kubernetes-dashboard-token |awk '{print $1}') | grep token: | awk '{print $2}' |
1 | kubectl -n kube-system describe $(kubectl -n kube-system get secret -n kube-system -o name | grep namespace) | grep token: |
- 创建ClusterRoleBinding
1 | apiVersion: rbac.authorization.k8s.io/v1 |
- URL
https://{master_ip}:6443/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/