gpt4 book ai didi

kubernetes - kubespray 仪表板警告禁止弹出窗口

转载 作者:行者123 更新时间:2023-12-02 11:35:40 27 4
gpt4 key购买 nike

我正在尝试使用 kubespray 在一台机器上设置一个新的 kubernetes 集群(提交 7e84de2ae116f624b570eadc28022e924bd273bc)。

运行剧本后(在新的 ubuntu 16.04 上),我打开仪表板并看到那些警告弹出窗口:

- configmaps is forbidden: User "system:serviceaccount:default:default" cannot list configmaps in the namespace "default"
- persistentvolumeclaims is forbidden: User "system:serviceaccount:default:default" cannot list persistentvolumeclaims in the namespace "default"
- secrets is forbidden: User "system:serviceaccount:default:default" cannot list secrets in the namespace "default"
- services is forbidden: User "system:serviceaccount:default:default" cannot list services in the namespace "default"
- ingresses.extensions is forbidden: User "system:serviceaccount:default:default" cannot list ingresses.extensions in the namespace "default"
- daemonsets.apps is forbidden: User "system:serviceaccount:default:default" cannot list daemonsets.apps in the namespace "default"
- pods is forbidden: User "system:serviceaccount:default:default" cannot list pods in the namespace "default"
- events is forbidden: User "system:serviceaccount:default:default" cannot list events in the namespace "default"
- deployments.apps is forbidden: User "system:serviceaccount:default:default" cannot list deployments.apps in the namespace "default"
- replicasets.apps is forbidden: User "system:serviceaccount:default:default" cannot list replicasets.apps in the namespace "default"
- jobs.batch is forbidden: User "system:serviceaccount:default:default" cannot list jobs.batch in the namespace "default"
- cronjobs.batch is forbidden: User "system:serviceaccount:default:default" cannot list cronjobs.batch in the namespace "default"
- replicationcontrollers is forbidden: User "system:serviceaccount:default:default" cannot list replicationcontrollers in the namespace "default"
- statefulsets.apps is forbidden: User "system:serviceaccount:default:default" cannot list statefulsets.apps in the namespace "default"

kubectl 命令看起来很好(代理工作,列出 pod 等。没有返回错误,/api 可以访问),但是,仪表板似乎无法获取任何有用的信息。我应该如何调试它?

最佳答案

kubectl create clusterrolebinding default-admin --clusterrole cluster-admin --serviceaccount=default:default

似乎可以解决问题 - 不过我欢迎解释。(是不是kubespray的疏忽?我需要在那里设置一个变量?它与RBAC有关吗?)

关于kubernetes - kubespray 仪表板警告禁止弹出窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52954810/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com