将Kubernetes仪表板部署到本地环境中

下载


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

开始

$ kubectl proxy
Starting to serve on 127.0.0.1:8001

通过浏览器访问以下网址:
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/

查看令牌


$ kubectl -n kube-system get secret
NAME                                             TYPE                                  DATA   AGE
deployment-controller-token-9b4gr                kubernetes.io/service-account-token   3      56m


// deployment-controller-token-xxxxを表示させる
$ kubectl -n kube-system describe secret deployment-controller-token-9b4gr
Name:         deployment-controller-token-9b4gr
Namespace:    kube-system
Labels:       <none>
Annotations:  kubernetes.io/service-account.name: deployment-controller
              kubernetes.io/service-account.uid: 590984b7-xxxx-xxxx-xxxx-xxxxxxxxxx

Type:  kubernetes.io/service-account-token

Data
====
ca.crt:     1025 bytes
namespace:  11 bytes
token:      eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9
// これがトークン
广告
将在 10 秒后关闭
bannerAds