Kubernete UI dashboard no cpu and memory usage information

6/22/2019

I am new kubernetes. Recently setup a a cluster with two services.

But the cpu and memory information for each pod is not shown in the dashboard.

Please let me know what did i missed.

enter image description here

I installed matrix-server from here https://github.com/kubernetes-incubator/metrics-server

when i execute kubectl top nodes -v 10

The response is always

I0622 18:15:03.699282    5524 round_trippers.go:438] GET https://172.*.*.*:6443/api/v1/namespaces/kube-system/services/http:heapster:/proxy/apis/metrics/v1alpha1/nodes?labelSelector= 200 OK in 3 milliseconds
I0622 18:15:03.699306    5524 round_trippers.go:444] Response Headers:
I0622 18:15:03.699313    5524 round_trippers.go:447]     Content-Type: application/json
I0622 18:15:03.699320    5524 round_trippers.go:447]     Date: Sat, 22 Jun 2019 18:15:03 GMT
I0622 18:15:03.699450    5524 request.go:942] Response Body: {
  "metadata": {},
  "items": null
 }
I0622 18:15:03.699550    7417 helpers.go:114] error: metrics not available yet

thank you

-- John
kubernetes

1 Answer

6/25/2019

Try using these args for metrics-server:

args:
  - --kubelet-insecure-tls
  - --kubelet-preferred-address-types=InternalIP

You may also find more hints in this github issue: https://github.com/kubernetes-incubator/metrics-server/issues/131

-- Sergey
Source: StackOverflow