Kubernetes Dashboard does not show CPU and Memory Usage

12/11/2021

I have a Problem with the Kubernetes Dashboard. I use actually the Managed Kubernetes Service AKS and created a Kubernetes Cluster with following Setup:

  • Kubernetes-Version 1.20.9
  • 1 Worker Node with Size Standard_DS2_v2

It starts successfully with the automatic configuration of coredns, corednsautoscaler, omsagent-rs, tunnelfront and the metrics-sever.

After that i applied three deployments for my services, which all are deployed successfully.

Now, i want to get access to the Kubernetes Dashboard. I used the instruction which is described on https://artifacthub.io/packages/helm/k8s-dashboard/kubernetes-dashboard.

After that I call kubectl proxy to access the dashboard via the url: http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/.

After i use my kubeconfig-File to Sign to Kubernetes Dashboard i get following output and nor cpu neither memory usage is displayed.

enter image description here

When i execute kubectl describe kubernetes-dashboard pod i get following: enter image description here

And the logs from the pod say following:

Internal error occurred: No metric client provided. Skipping metrics.
2021/12/11 19:23:04 [2021-12-11T19:23:04Z] Outcoming response to 127.0.0.1:43392 with 200 status code
2021/12/11 19:23:04 Internal error occurred: No metric client provided. Skipping metrics.
2021/12/11 19:23:04 [2021-12-11T19:23:04Z] Outcoming response to 127.0.0.1:43392 with 200 status code
2021/12/11 19:23:04 Internal error occurred: No metric client provided. Skipping metrics.
-- k_gokhan1905
dashboard
kubernetes
metrics

1 Answer

12/12/2021

... I used the instruction which is described on https://artifacthub.io/packages/helm/k8s-dashboard/kubernetes-dashboard.

The dashboard needs a way to "cache" a small window of metrics collected from the metrics server. The instruction provided there doesn't have this enabled. You can run the following to install/upgrade kubernetes-dashboard with metrics scraper enabled:

helm upgrade -i kubernetes-dashboard/kubernetes-dashboard --name my-release \  
--set=service.externalPort=8080,resources.limits.cpu=200m,metricsScraper.enabled=true
-- gohm'c
Source: StackOverflow