5fcb62d0a24336654.jpg_fo742.jpg
yaml文件下载:

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

修改https服务暴露方式为NodePort

---

kind: Service
apiVersion: v1
metadata:
  labels:
    k8s-app: kubernetes-dashboard
  name: kubernetes-dashboard
  namespace: kubernetes-dashboard
spec:
  type: NodePort
  ports:
    - port: 443
      targetPort: 8443
      nodePort: 30000
  selector:
    k8s-app: kubernetes-dashboard

---

获取token

kubectl describe secret/(kubectl get secret -n kube-system |grep admin|awk '{print1}') -n kube-system

火狐浏览器打开(谷歌浏览器不认这个证书):

https://172.16.0.20:30000

贴入token

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code