Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

98
Views
Get value of other label while applying filter on one label in PromQL

I have a kubernetes cluster hosting multiple tenants. I want to filter out the nodes belonging to a particular tenant. For example:

Querying kube_node_labels to prometheus results in the following output:

kube_node_labels{ node="ip-10-139-110-166.ec2.internal", label_tenant: "tenant1" }
kube_node_labels{ node="ip-10-139-110-167.ec2.internal", label_tenant: "tenant2" }
kube_node_labels{ node="ip-10-139-110-168.ec2.internal", label_tenant: "tenant1" }

Is there a way I can just get all the nodes belonging to a particular tenant as array? For e.g. ip-10-139-110-166.ec2.internal, ip-10-139-110-168.ec2.internal for tenant1

Basically, what's the equivalent of select node from kube_node_labels where label_tenant="tenant1" in PromQL?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I was able to achieve it with the following query: label_values(kube_node_labels{label_tenant="tenant1"}, node)

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!