mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
Openshift 4 documentation for labelling nodes referencing to the MachineSet component is unclear
This commit is contained in:
committed by
openshift-cherrypick-robot
parent
488f91ab7f
commit
e94eb1ccfe
@@ -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:
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user