Node Selectors

Node selectors are the most straightforward constraints that can be used with the Kubernetes scheduler. Node selectors are part of pod specification, and they are key-value maps. The keys of the node selector are expected to match with node labels,
and the values are the constraints for the scheduler.

They are included in the pod specification as follows:

apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx
nodeSelector:
beta.kubernetes.io/arch: amd64

With that pod definition, the Kubernetes scheduler is limited to assigning the pod nginx to a node with an architecture of amd64. If there are no nodes with the constraints, the pods will wait in a Pending state until a node that ensures the
limitations join the cluster.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.96.214