<p>We use <code>prometheus(v: 1.7.0)</code> as monitor for a <code>k8s(v: 1.10.11)</code> cluster. In k8s, we have multiple <code>namespaces</code>. Are there in <code>prometheus metric</code> to tell the <code>CPU</code> and <code>memory limit</code> in each <code>namespace</code>?</p>

<p>Or in the other words, how to find metrics in prometheus to read resourcequota's limits.cpu and limits.memory</p>

<p>There are no built-in CPU and memory limits in namespaces, but you can define them with <a href="https://kubernetes.io/docs/concepts/policy/resource-quotas/" rel="nofollow noreferrer">resource quotas</a>.</p>

<p>So, you don't need Prometheus to get this information, but you can just query the ResourceQuota objects through the API server.</p>

<p>If you need this information in Promtheus, you can use the <a href="https://github.com/kubernetes/kube-state-metrics" rel="nofollow noreferrer">kube-state-metrics</a> Prometheus exporter, which exposes <a href="https://github.com/kubernetes/kube-state-metrics/blob/master/docs/resourcequota-metrics.md" rel="nofollow noreferrer">metrics about ResourceQuota objects</a>.</p>
