【问题标题】:Kubernetes-Dashboard Pod is not working once we install using HELM一旦我们使用 HELM 安装,Kubernetes-Dashboard Pod 就无法工作
【发布时间】:2019-09-17 17:51:23
【问题描述】:

我们在 GKE 上使用 HELM 安装后,Kubernetes-Dashboard pod 无法正常工作。有人可以掌舵吗?我们如何能够从外部访问仪表板

kubectl get po --all-namespaces

命名空间默认

名称dashboard-demo-kubernetes-dashboard-6586b59d57-dxj6p

就绪:0/1 CrashLoopBackOff 11 36m

请查看以下日志:

  1. 同步器 kubernetes-dashboard-key-holder-kube-system 退出并出现错误:kubernetes-dashboard-key-holder-kube-system watch 超时

  2. 恐慌:机密被禁止:用户“system:serviceaccount:default:dashboard-demo-kubernetes-dashboard”无法在命名空间“kube-system”中创建机密

【问题讨论】:

    标签: google-kubernetes-engine kubernetes-helm


    【解决方案1】:

    在集群内创建命名空间和机密是权限问题。您可以使用 CRD(自定义资源定义)来创建服务帐户并分配它。

    kubectl create clusterrolebinding kubernetes-dashboard --clusterrole=cluster-admin --serviceaccount=kube-system:kubernetes-dashboard
    

    您也可以在 github 官方 helm chart 找到更多关于仪表板访问控制的信息:https://github.com/kubernetes/dashboard/wiki/Access-control

    【讨论】:

    • 感谢您的信息。现在我的 pod 工作正常,但我无法从外部访问仪表板。并且在内部也变得像“状态”:“失败”,“消息”:“没有可用于服务的端点\”https:kubernetes-dashboard:\“”。你能帮忙吗?这是我在内部使用的网址。卷曲localhost:8001/api/v1/namespaces/kube-system/services/…
    • kubectl get po --namespace=kube-system |grep kubernetes kubernetes-dashboard-5478c45897-bzbxg 1/1 运行 0 21m
    • 您使用的是哪个云提供商?
    • 你可以试试kubectl get svc -n kube-system,然后只试试curl localhost:8001/api 或点击service name for dashboard
    • 我在本地访问时遇到错误。curl localhost:8001/api/v1/namespaces/kube-system/services/… { "kind": "Status", "apiVersion": "v1", "metadata": { }, "status" : "Failure", "message": "no endpoints available for service \"https:kubernetes-dashboard:\"", "reason": "ServiceUnavailable", "code": 503
    猜你喜欢
    • 2019-11-11
    • 2021-12-24
    • 2019-03-03
    • 2018-01-26
    • 1970-01-01
    • 1970-01-01
    • 2021-11-21
    • 2018-09-30
    • 1970-01-01
    相关资源
    最近更新 更多