headlamp-k8s / headlamp

A Kubernetes web UI that is fully-featured, user-friendly and extensible
https://headlamp.dev
Apache License 2.0
2.38k stars 170 forks source link

Pod metrics not shown #2553

Open manju-rn opened 2 weeks ago

manju-rn commented 2 weeks ago

The node metrics are show. However the pod metrics are not shown. Can headlamp display that? the cpu and memory usage along with requests and limits information would greatly help

Here is my output of k top pods -A

NAMESPACE     NAME                                       CPU(cores)   MEMORY(bytes)
default       cf-app-78ffc8ff85-wmg7g                    3m           30Mi
kube-system   calico-kube-controllers-759cd8b574-vtp4k   2m           30Mi
kube-system   calico-node-58fdx                          24m          100Mi
kube-system   coredns-7896dbf49-ktv8n                    2m           30Mi
kube-system   metrics-server-df8dbf7f5-4jjjp             3m           35Mi
traefik       traefik-6d574648c7-pz7vf                   1m           79Mi
vscode-ns     vscodeapp-8c8687db7-4bjkl                  2m           192Mi
feym78 commented 1 week ago

Hi! As I know for pod metrics to work you should have prometheus installed inside your k8s cluster

manju-rn commented 1 week ago

Hi! As I know for pod metrics to work you should have prometheus installed inside your k8s cluster

Is this a headlamp requirement? Since pod metrics generally works fine without it as per my snapshot in earlier post above

feym78 commented 1 week ago

Hi! As I know for pod metrics to work you should have prometheus installed inside your k8s cluster

Is this a headlamp requirement? Since pod metrics generally works fine without it as per my snapshot in earlier post above

Yes, headlamp use prometheus plugin for rendering metrics, it search for a prometheus instance inside of the k8s cluster and grab metrics from it.

knrt10 commented 1 week ago

Hi @manju-rn you can try installing prometheus in Headlamp app by selecting the Apps page from the sidebar. Please check prometheus plugins for more information.