2017-07-14 55 views
3

我已經在2個minion節點上安裝了Docker v17.06-ce,另外還有一個主節點和Kubernetes以及Kubeadm v1.7.0。然後,我用kubectl create -f https://git.io/kube-dashboard部署了Web UI(Dashboard),並使用kubectl edit service kubernetes-dashboard -n kube-system將類型更改爲NodePortKubernetes Web UI(儀表板)不顯示圖形

我可以訪問它,但缺少CPU /內存使用量圖。所以我按照Kuberenets Web UI (Dashboard) missing graphs的說明來部署heapster和influxdb,但是我仍然看不到石墨...

怎麼回事?

UPDATE: 檢查日誌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) 

任何想法?

回答

2

您需要安裝heapster吊艙。嘗試安裝並檢查。

安裝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 
+1

或者你也可以使用helm來安裝heapster。 – sfgroups

+0

我試過了,但圖表仍然丟失。據我猜測,我還需要一個influxdb服務。這是我說我已經完成以下鏈接信息https://stackoverflow.com/questions/41832273/kuberenets-web-ui-dashboard-missing-graphs沒有成功...任何想法? – dpatino

+0

你的日誌消息表示缺少訪問權限,請嘗試創建heapster rbac,並在帖子中添加評論。 – sfgroups