Node Selector
Describe about Node Selector
Last updated
Describe about Node Selector
Last updated
Node Selector is a property that allows you to specify the node when creating the Pod or any other resource. The value of this property is derived from the label of the Node. Example:
We aim to deploy the Pod on the Node with the highest available resources.
We add the label to Node A
by using this command: kubectl label node <node_name> <label_key>=<label_value>
Add the Node Selector
property in Pod
template
Disadvantage of this strategy:
If we label Node A as "Large" and Node B as "Medium," our requirement is to deploy the Pod on a Node with either "Large" or "Medium" resources. However, the current configuration does not allow for this preference.