How to sign in kubernetes dashboard?

后端 未结 9 2162
清酒与你
清酒与你 2020-12-07 07:01

I just upgraded kubeadm and kubelet to v1.8.0. And install the dashboard following the official document.

$ kubectl apply -f https://raw.githubusercontent.co         


        
9条回答
  •  情深已故
    2020-12-07 07:43

    If you don't want to grant admin permission to dashboard service account, you can create cluster admin service account.

    $ kubectl create serviceaccount cluster-admin-dashboard-sa
    $ kubectl create clusterrolebinding cluster-admin-dashboard-sa \
      --clusterrole=cluster-admin \
      --serviceaccount=default:cluster-admin-dashboard-sa
    

    And then, you can use the token of just created cluster admin service account.

    $ kubectl get secret | grep cluster-admin-dashboard-sa
    cluster-admin-dashboard-sa-token-6xm8l   kubernetes.io/service-account-token   3         18m
    $ kubectl describe secret cluster-admin-dashboard-sa-token-6xm8l
    

    I quoted it from giantswarm guide - https://docs.giantswarm.io/guides/install-kubernetes-dashboard/

提交回复
热议问题