bash as described in the link, after ...Is there a reason why you did not use GKE (Google Kubernetes Engine) which provides the dashboard add-on installed out of the box?In your case, simply:
the kubernetes-dashboard addon might not be installed (but logs say so, so I think this is not the problem)curl -sS https://get.k8s.io | bash
network configuration that makes kubectl cluster-info
work might not be there
kubernetes-dashboard is running at https://35.188.109.36/api/v1/proxy/namespaces/kube-
system/services/kubernetes-dashboard
the
User "system:anonymous" cannot proxy services in the namespace
"kube-system".: "No policy matched."
script you used probably did not configure the authentication properly.
I recommend using GKE as this works out of the box. You can find documentation here:.
我使用下面的命令,以获得一个运行的集群,在gcloud控制台,我输入:
kubectl proxy
但当我从firefox转到那个网址时,得到的信息是: curl .. | sh
如果你还想使用GCE,我建议你运行 kubectl proxy
工作站(而不是kubernetes节点)上,访问 http://127.0.0.1:8001/ui
浏览器上的RBAC策略,看看它是否有效。
如果你得到一个关于没有足够权限的错误,你可能使用了一个足够新的Kubernetes版本,在像dashboard这样访问API的pod上强制执行RBAC策略。你可以通过运行来授予这些权限。
kubectl create clusterrolebinding add-on-cluster-admin \
--clusterrole=cluster-admin \
--serviceaccount=kube-system:default
我还建议你在谷歌云控制台中尝试使用GKE UI。https:/console.cloud.google.comkubernetes。
你可以运行 kubectl proxy
在本地访问,并在 http:/localhost:8001ui。