gpt4 book ai didi

docker - Kubernetes Web UI(仪表板)不显示图表

转载 作者:行者123 更新时间:2023-12-02 19:27:14 25 4
gpt4 key购买 nike

我已经在 2 个 minion 节点以及一个主节点和带有 Kubeadm v1.7.0 的 Kubernetes 上安装了 Docker v17.06-ce。然后我使用 kubectl create -f https://git.io/kube-dashboard 部署了 Web UI(仪表板)并使用 kubectl edit service kubernetes-dashboard -n kube-system 将类型更改为 NodePort .

我可以访问它,但缺少 CPU/内存使用图。所以我按照 Kuberenets Web UI (Dashboard) missing graphs 的说明进行操作部署 heapster 和 influxdb,但我仍然看不到图表...

出了什么问题?

更新:检查日志kubectl logs heapster-2994581613-m28hh --namespace=kube-system我反复发现这些错误:

E0717 09:14:05.000881       7 kubelet.go:271] No nodes received from APIserver.
E0717 09:14:05.947260 7 reflector.go:203] k8s.io/heapster/metrics/processors/node_autoscaling_enricher.go:100: Failed to list *api.Node: the server does not allow access to the requested resource (get nodes)
E0717 09:14:05.959150 7 reflector.go:203] k8s.io/heapster/metrics/heapster.go:319: Failed to list *api.Pod: the server does not allow access to the requested resource (get pods)
E0717 09:14:05.959254 7 reflector.go:203] k8s.io/heapster/metrics/heapster.go:327: Failed to list *api.Node: the server does not allow access to the requested resource (get nodes)
E0717 09:14:05.959888 7 reflector.go:203] k8s.io/heapster/metrics/sources/kubelet/kubelet.go:342: Failed to list *api.Node: the server does not allow access to the requested resource (get nodes)
E0717 09:14:05.959995 7 reflector.go:203] k8s.io/heapster/metrics/processors/namespace_based_enricher.go:84: Failed to list *api.Namespace: the server does not allow access to the requested resource (get namespaces)
E0717 09:14:06.957399 7 reflector.go:203] k8s.io/heapster/metrics/processors/node_autoscaling_enricher.go:100: Failed to list *api.Node: the server does not allow access to the requested resource (get nodes)
E0717 09:14:06.965155 7 reflector.go:203] k8s.io/heapster/metrics/sources/kubelet/kubelet.go:342: Failed to list *api.Node: the server does not allow access to the requested resource (get nodes)
E0717 09:14:06.965166 7 reflector.go:203] k8s.io/heapster/metrics/heapster.go:327: Failed to list *api.Node: the server does not allow access to the requested resource (get nodes)
E0717 09:14:06.966403 7 reflector.go:203] k8s.io/heapster/metrics/heapster.go:319: Failed to list *api.Pod: the server does not allow access to the requested resource (get pods)
E0717 09:14:06.966964 7 reflector.go:203] k8s.io/heapster/metrics/processors/namespace_based_enricher.go:84: Failed to list *api.Namespace: the server does not allow access to the requested resource (get namespaces)

有什么想法吗?

最佳答案

您需要安装heapster pod。尝试安装并检查。

还安装 heapster rbac。

kubectl  create -f https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-config/rbac/heapster-rbac.yaml

kubectl create -f https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-config/influxdb/heapster.yaml

关于docker - Kubernetes Web UI(仪表板)不显示图表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45098354/

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