docker for mac 安装 kubernetes、kubernetes dashboard

kubectl get namespaces
kubectl get pods --namespace kube-system
kubectl get deployments --namespace kube-system
kubectl get services --namespace kube-system
kubectl -n kube-system edit service kubernetes-dashboard
kubectl get pods
kubectl get deployments
kubectl get services
kubectl config view

获取令牌,然后登陆 kubernetes dashboard

➜  ~ kubectl get secrets
NAME                  TYPE                                  DATA      AGE
default-token-6ljm8   kubernetes.io/service-account-token   3         6h
➜  ~ kubectl describe secrets default-token-6ljm8
Name:         default-token-6ljm8
Namespace:    default
Labels:       <none>
Annotations:  kubernetes.io/service-account.name=default
              kubernetes.io/service-account.uid=77d014c2-0804-11e9-acd8-025000000001

Type:  kubernetes.io/service-account-token

Data
====
ca.crt:     1025 bytes
namespace:  7 bytes
token:      eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJkZWZhdWx0Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZWNyZXQubmFtZSI6ImRlZmF1bHQtdG9rZW4tNmxqbTgiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC5uYW1lIjoiZGVmYXVsdCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6Ijc3ZDAxNGMyLTA4MDQtMTFlOS1hY2Q4LTAyNTAwMDAwMDAwMSIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDpkZWZhdWx0OmRlZmF1bHQifQ.G9TGa4KGj5B-cMv-0-vuangR2_tFiQ1nJMgtsEPs1BEwPAyjmaC-BL5y0Ux9HyC1mlt0DklO-8_o41i4OD_w0wLymxi8zZQxgY7Tlu3_oE5OKnK58xWN-mMTKKnvfDpZrIBbkWQ5EB49LC7QiTBKGAoixGyOBvU1fmD2AzpdO3sWvNsaOWbMLFcwzHA-M2V-CKU3I07Hxs6uIi9juk4IqkTryfvCDUafTrubpkVktwQr7UwzvmKfbPoWLyn1tbCDhR3Il64daoTE9nlmqWwYZZFmfaZjWWWYfi3QPXuNUNpXRVVd_6gcjUzebR1o-22KoOUbobQ94K-1bYJOQSZNnA

将 token 部分复制到登录页的 token 输入框,登陆即可。
出处:http://www.cnblogs.com/along21/p/9811860.html#auto_id_11

posted on 2018-12-24 18:02 cag2050 阅读(...) 评论(...) 编辑 收藏

导航