1. 程式人生 > >kubernetes原生dashboard部署

kubernetes原生dashboard部署

獲取部署的yaml檔案:

修改yaml檔案:

1.deployment:

        image: daocloud.io/liukuan73/kubernetes-dashboard-amd64:v1.8.3
        imagePullPolicy: IfNotPresent
...
      nodeSelector:
        node-role.kubernetes.io/master: true
      # Comment the following tolerations if Dashboard must not be deployed on master
tolerations: - key: node-role.kubernetes.io/master effect: NoSchedule

2.service:

    type: NodePort
      nodePort: 30001

3.把Role和RoleBinding註釋掉。

登入介面

kubectl get secret -n kube-system | grep dashboard  
kubectl describe secret kubernetes-dashboard-token-xtxc4 -n kube-system
輸入獲取到的這個token登入: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJrdWJlcm5ldGVzLWRhc2hib2FyZC10b2tlbi14dHhjNCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJrdWJlcm5ldGVzLWRhc2hib2FyZCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6IjljNTJhYzg1LTZjYmUtMTFlOC1iZWNiLTAwNTA1Njk0ZWI2YSIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDprdWJlLXN5c3RlbTprdWJlcm5ldGVzLWRhc2hib2FyZCJ9.
hup623KovQYD47bnCyB76jsZp1KwugbQLNINucrubvYXDK5KVsAhLu36SQls4bid-Zt5n5wRI6T5o4YrgCzmyngQu9Y_gMwdOWawEfJgorTp_YvK6227SG-0CQUYWeo7kqyJAXhWWax8vbxbBTvY4vDCO1RsxPNmQf5OiU8dzpQseIXVcWp-Xrj3WZK6eMsxQJs0DKVbw6V4Xcp8mAqe53RY1FHhVCyzExMMy5QtaPo1wav3XmrM24yM8EgSOYKWT-JBkBQaazH_2SU_GlvS_cqe9b_WMLG2TirhSD5vKhuPlfM3OESrfQao8vPTgBKG5iMWg2LZcA_ZPu7LgDhQdQ

參考: