I am fairly new to Kubernetes and had a question concerning kube-state-metrics. When I simply monitor Kubernetes using Prometheus I obtain a set of metrics from the cAdvisor, the nodes (node exporter), the pods, etc. When I include the kube-state-metrics, I seem to obtain more "relevant" metrics. Do kube-state-metrics allow to scrape "new" information from Kubernetes or are they rather "formatted" metrics using the initial Kubernetes metrics (from the nodes, etc. I mentioned earlier).
Asked
Active
Viewed 645 times
1 Answers
4
The two are basically unrelated. Cadvisor is giving you low-level stats about the containers like how much RAM and CPU they are using. KSM gives you info from the Kubernetes API like the Pod object status. Both are useful for different things and you probably want both.

coderanger
- 52,400
- 4
- 52
- 75
-
thank you for your answer. Is it then theoretically possible to obtain the values of the kube-state-metrics by aggregating e.g. different CPU values from the cAdvisor? – Tony.H Oct 10 '19 at 06:55
-
No, the values in KSM are things like the CPU request and limit from your container specifications, not the actual values being used. You could definitely compare those though. – coderanger Oct 10 '19 at 22:06