其他分享
首页 > 其他分享> > kubernet dashboard 一键安装

kubernet dashboard 一键安装

作者:互联网

将 https://github.com/ainnodb/pyauto/tree/master/kubernetes/dashboard 下载到本地

将https://github.com/ainnodb/pyauto/blob/master/kubernetes/functions.ksh 拷到root 目录下

然后执行

sh dashboard.sh

运行结果

[root@win74 dashboard]# sh dashboard.sh
...............apply dashboard..................
serviceaccount/dashboard-admin unchanged
clusterrolebinding.rbac.authorization.k8s.io/dashboard-admin unchanged
namespace/kubernetes-dashboard unchanged
serviceaccount/kubernetes-dashboard unchanged
service/kubernetes-dashboard unchanged
secret/kubernetes-dashboard-certs unchanged
secret/kubernetes-dashboard-csrf configured
Warning: resource secrets/kubernetes-dashboard-key-holder is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should onl                        y be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically.
secret/kubernetes-dashboard-key-holder configured
configmap/kubernetes-dashboard-settings unchanged
role.rbac.authorization.k8s.io/kubernetes-dashboard unchanged
clusterrole.rbac.authorization.k8s.io/kubernetes-dashboard unchanged
rolebinding.rbac.authorization.k8s.io/kubernetes-dashboard unchanged
clusterrolebinding.rbac.authorization.k8s.io/kubernetes-dashboard unchanged
deployment.apps/kubernetes-dashboard unchanged
service/dashboard-metrics-scraper unchanged
deployment.apps/dashboard-metrics-scraper unchanged
...............apply dashboard done ..................
Wait for dashboard
dashboard-admin-token-kxksx
token: eyJhbGciOiJFUzI1NiIsImtpZCI6Im4xMFBiWFRwYU9TWUlyOWt5WUhrXzEtSEY5SnhCNkppcEU0U1Jqci1DdGMifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJkYXNoYm9hcmQtY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YSpyac5ZfRVtOz0a6HNcW-O6g
Cluster "kubernetes" set.
User "admin" set.
Context "admin" modified.
Switched to context "admin".

 

 登录 使用config file <ip>-dashboard-admin.conf

https://hostname:30000

https://win74:30000/#/workloads?namespace=_all

 

标签:kubernetes,admin,unchanged,一键,dashboard,io,kubernet,authorization
来源: https://www.cnblogs.com/tingxin/p/16264436.html