New user for k9s..tool works., but can't see cpu / memory usage..it says n/a
k9s version is 0.2.4 and k8s version is v1.13.0
@shankar-bala Do you have a metrics-server running on your clusters?
hi @derailed , so in order to have the cpu/memory usage shown in the table, we need to have a prometheus instance running on the cluster?
never mind it works after installing metrics-server into the cluster. In my case, working with EKS cluster:
https://docs.aws.amazon.com/eks/latest/userguide/metrics-server.html
I do have the metrics-server running but still get no cluster wide CPU and MEM numbers. Is there any specific label that k9s looks for to find the metrics server?
Edit: What I had running is something else (kube-state-metrics). Installing the metrics server does seem to fix it.
If anyone comes back to this (or #269) and have the issue even though they have metrics-server up and running, it might be due to a permissions of your user. Thought I should share.
K9s seems to be getting the CPU/Mem usage from the same resource as kubectl top nodes. If you don't have the metrics permissions, you'd get an error something along the line when you run this;
Error from server (Forbidden): nodes.metrics.k8s.io is forbidden: User "$USER" cannot list resource "nodes" in API group "metrics.k8s.io" at the cluster scope
Granting this permission to your user should fix the issue.
See;