<p>I have a kubernetes cluster hosting multiple tenants. I want to filter out the nodes belonging to a particular tenant. For example:</p>
<p>Querying <code>kube_node_labels</code> to prometheus results in the following output:</p>
<pre><code>kube_node_labels{ node=&quot;ip-10-139-110-166.ec2.internal&quot;, label_tenant: &quot;tenant1&quot; }
kube_node_labels{ node=&quot;ip-10-139-110-167.ec2.internal&quot;, label_tenant: &quot;tenant2&quot; }
kube_node_labels{ node=&quot;ip-10-139-110-168.ec2.internal&quot;, label_tenant: &quot;tenant1&quot; }
</code></pre>
<p>Is there a way I can just get all the nodes belonging to a particular tenant as array? For e.g. <code>ip-10-139-110-166.ec2.internal</code>, <code>ip-10-139-110-168.ec2.internal</code> for tenant1</p>
<p>Basically, what's the equivalent of
<code>select node</code> from <code>kube_node_labels</code> where <code>label_tenant=&quot;tenant1&quot;</code> in PromQL?</p>

Aman
<p>I was able to achieve it with the following query:
<code>label_values(kube_node_labels{label_tenant=&quot;tenant1&quot;}, node)</code></p>
