How to use node selector to assign virtual machines to a node
In some circumstances, we want to control which node the virtual machine or pod deploys to. The node selector can be used to assign virtual machine or pod to a node.
Add label to a node
The label can be added to a node from either command line or openshift web console.
1 | $ oc get nodes |
This can also be done through openshift web console by clicking the “edit labels” option on a node.
Add a nodeSelector field to the virtual machine
A node selector can be added through openshift web console.
1 | $ oc describe vm vm1 |