无法访问谷歌云上的Kubernetes仪表板。

问题描述 投票:3回答:3

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 | bashnetwork 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:
kubernetes dashboard gcloud google-kubernetes-engine
3个回答
2
投票

.

我使用下面的命令,以获得一个运行的集群,在gcloud控制台,我输入:

  • 如在链接中描述的, 之后,我运行的命令
  • 从,我得到了。kubectl proxy但当我从firefox转到那个网址时,得到的信息是:
  • 预期的行为。应该要求一个管理员姓名和密码 连接到仪表板。curl .. | sh

我按照这里给出的说明进行操作。我使用下面的命令来获取一个正在运行的集群,在gcloud控制台中我输入: curl -sS https:/get.k8s.io /cloud.google.comkubernetes-enginedocsoss-ui。


如果你还想使用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。


0
投票

你要找的东西已经被废弃了。我们需要使用Cloud Console仪表盘。此处.

官方信息:

开源的Kubernetes Dashboard插件对于GKE上的集群来说已经废弃,并将在1.15版本中作为一个选项被移除。建议使用在以下网站上描述的替代性Cloud Console仪表盘 本页.


-5
投票

你可以运行 kubectl proxy 在本地访问,并在 http:/localhost:8001ui。

© www.soinside.com 2019 - 2024. All rights reserved.