kubernetes1.14部署kube-dashboard:

部署dashboard wget https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.0/src/deploy/recommended/kubernetes-dashboard.yaml
vim kubernetes-dashboard.yaml
#kind: Role 修改kind: ClusterRole 和 #kind: RoleBinding 修改为kind: ClusterRoleBinding 和# kind: Role kind: ClusterRole
image修改为:image: registry.cn-hangzhou.aliyuncs.com/wzz/kubernetes-dashboard-amd64:v1.10.0
type: NodePort 新增加这一条
ports:

  • port: 443
    应用dashboard权限: kubectl apply -f kube-dashboard-access.yaml
    默认dashboard只能本机访问,
    确定以前是否开启proxy, 8001端口没有被占用,如果有执行如下:
    kill -9 42039 ###kill 掉默认的 192.168.40.146:8001 用 #nohup kubectl proxy & 命令启动;这样就可以启动如下命令
    然后执行下边命令启动
    开启代理 - kubectl proxy --address='192.168.40.146' --accept-hosts='^*$' &
    查看:kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep dashboard |grep token | awk '{print $1}')
    查看token: kubectl get secret -n kube-system | grep dashboard 和 kubectl describe secret kubernetes-dashboard-admin

猜你喜欢

转载自blog.51cto.com/xudate/2384168