A node selector is a scheduling constraint that places a pod only on nodes whose labels match specified key-value criteria. Label nodes by capabilities or roles, then set the pod’s spec.nodeSelector field. This keeps workloads such as low-latency storage users, frontends, or GPU software on suitable nodes while allowing Kubernetes to choose among matching nodes. section 7.3.2
Schedule a frontend pod
Label a node with node-role=front-end, then add this constraint to the pod: spec: nodeSelector: node-role: front-end After creation, kubectl get pod kiada-front-end -o wide shows the pod running on the matching node. If several nodes have the label, Kubernetes can select any eligible one rather than binding the pod to a named node.
Use node selectors in several workload relationships:
- A DaemonSet places pods only on nodes whose labels match the selector in its pod template; changing node labels can bring nodes into or remove them from scope. section 17.1.3
- Do not confuse a node selector with a pod selector: the former filters eligible nodes, while the latter identifies pods belonging to an object or receiving service traffic. section 7.3.2 section 17.1.3



