cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

nodeSelector in kubernetes

jcamps
Advisor

Hi all,

 

we have three labels in our kubernetes nodes: node-role.kubernetes.io/worker, node-role.kubernetes.io/infra and region.datacenter=1

 

I'm interested in monitor the kubernetes nodes with these labels:

 

(node-role.kubernetes.io/worker OR node-role.kubernetes.io/infra) AND region.datacenter=1

 

¿How can specify this in the yaml nodeSelector property? AND and OR label combinations...

 

Regards! Josep Maria

2 REPLIES 2

jcamps
Advisor

Hi all,

 

I answer myself, you're able to specify "AND" logic in the yaml nodeSelector property:

 

nodeSelector:
    region.datacenter: Alcala1
    dynatrace.managed: "true"

 

this selects nodes with property region.datacenter: Alcala1 AND dynatrace.managed: "true"

 

Regards! Josep Maria

Thank you, @jcamps for getting back with an answer! 👏 This is really valuable for other Community members.

Keep calm and build Community!

Featured Posts