简体   繁体   English

k8s prometheus:prometheus 中的哪个指标告诉命名空间的 cpu 和 memory 限制

[英]k8s prometheus: which metric in prometheus tells namespace's cpu and memory limit

We use prometheus(v: 1.7.0) as monitor for a k8s(v: 1.10.11) cluster.我们使用prometheus(v: 1.7.0)作为k8s(v: 1.10.11)集群的监视器。 In k8s, we have multiple namespaces .在 k8s 中,我们有多个namespaces Are there in prometheus metric to tell the CPU and memory limit in each namespace ?普罗米修斯prometheus metric中是否有告诉每个namespace中的CPUmemory limit

Or in the other words, how to find metrics in prometheus to read resourcequota's limits.cpu and limits.memory或者换句话说,如何在prometheus中找到metrics来读取resourcequota的limits.cpu和limits.memory

There are no built-in CPU and memory limits in namespaces, but you can define them with resource quotas .命名空间中没有内置 CPU 和 memory 限制,但您可以使用资源配额来定义它们。

So, you don't need Prometheus to get this information, but you can just query the ResourceQuota objects through the API server.因此,您不需要 Prometheus 来获取这些信息,而只需通过 API 服务器查询 ResourceQuota 对象即可。

If you need this information in Promtheus, you can use the kube-state-metrics Prometheus exporter, which exposes metrics about ResourceQuota objects .如果您在 Promtheus 中需要此信息,可以使用kube-state-metrics Prometheus 导出器,它公开有关 ResourceQuota 对象的指标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM