nodeSelector in kubernetes

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

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! :clap: This is really valuable for other Community members.