diff --git a/modules/nodes-scheduler-node-selectors-pod.adoc b/modules/nodes-scheduler-node-selectors-pod.adoc index 43b58f873f..6e20d4e88e 100644 --- a/modules/nodes-scheduler-node-selectors-pod.adoc +++ b/modules/nodes-scheduler-node-selectors-pod.adoc @@ -40,7 +40,7 @@ Controlled By: ReplicaSet/router-default-66d5cf9464 ---- The web console lists the controlling object under `ownerReferences` in the pod YAML: -+ + ---- ownerReferences: - apiVersion: apps/v1 @@ -65,12 +65,6 @@ For example, to label a node: $ oc label nodes ip-10-0-142-25.ec2.internal type=user-node region=east ---- + -To label a MachineSet: -+ ----- -$ oc label MachineSet abc612-msrtw-worker-us-east-1c type=user-node region=east ----- -+ The label is applied to the node: + ---- @@ -96,7 +90,47 @@ metadata: type: user-node <1> .... ---- -<1> Label added to the node. +<1> Specify the label(s) you will add to the node. ++ +Alternatively, you can add the label to a MachineSet: ++ +---- +$ oc edit MachineSet abc612-msrtw-worker-us-east-1c +---- ++ +[source,yaml] ++ +---- +apiVersion: machine.openshift.io/v1beta1 +kind: MachineSet + +.... + +spec: + replicas: 2 + selector: + matchLabels: + machine.openshift.io/cluster-api-cluster: ci-ln-89dz2y2-d5d6b-4995x + machine.openshift.io/cluster-api-machine-role: worker + machine.openshift.io/cluster-api-machine-type: worker + machine.openshift.io/cluster-api-machineset: ci-ln-89dz2y2-d5d6b-4995x-worker-us-east-1a + template: + metadata: + creationTimestamp: null + labels: + machine.openshift.io/cluster-api-cluster: ci-ln-89dz2y2-d5d6b-4995x + machine.openshift.io/cluster-api-machine-role: worker + machine.openshift.io/cluster-api-machine-type: worker + machine.openshift.io/cluster-api-machineset: ci-ln-89dz2y2-d5d6b-4995x-worker-us-east-1a + spec: + metadata: + creationTimestamp: null + labels: + region: east <1> + type: user-node <1> +.... +---- +<1> Specify the label(s) you will add to the node. . Add the desired node selector a pod: +