We use prometheus(v: 1.7.0)
as monitor for a k8s(v: 1.10.11)
cluster. In k8s, we have multiple namespaces
. Are there in prometheus metric
to tell the CPU
and memory limit
in each namespace
?
Or in the other words, how to find metrics in prometheus to read resourcequota's limits.cpu and limits.memory
There are no built-in CPU and memory limits in namespaces, but you can define them with resource quotas.
So, you don't need Prometheus to get this information, but you can just query the ResourceQuota objects through the API server.
If you need this information in Promtheus, you can use the kube-state-metrics Prometheus exporter, which exposes metrics about ResourceQuota objects.