Skip to content

Commit 3a1c848

Browse files
author
Daniel Chadwick
committed
ocpbugs18514: fixing procedure in the machine-management Infrastructure machine section
1 parent 64c2702 commit 3a1c848

File tree

2 files changed

+54
-8
lines changed

2 files changed

+54
-8
lines changed

machine_management/creating-infrastructure-machinesets.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ include::modules/binding-infra-node-workloads-using-taints-tolerations.adoc[leve
9797

9898
* See xref:../nodes/scheduling/nodes-scheduler-about.adoc#nodes-scheduler-about[Controlling pod placement using the scheduler] for general information on scheduling a pod to a node.
9999
* See xref:moving-resources-to-infrastructure-machinesets[Moving resources to infrastructure machine sets] for instructions on scheduling pods to infra nodes.
100+
* See xref:../nodes/scheduling/nodes-scheduler-taints-tolerations.adoc#nodes-scheduler-taints-tolerations-about_nodes-scheduler-taints-tolerations[Understanding taints and tolerations] for more details about different effects of taints.
100101

101102
[id="moving-resources-to-infrastructure-machinesets"]
102103
== Moving resources to infrastructure machine sets

modules/binding-infra-node-workloads-using-taints-tolerations.adoc

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ For example:
5353
+
5454
[source,terminal]
5555
----
56-
$ oc adm taint nodes node1 node-role.kubernetes.io/infra=reserved:NoExecute
56+
$ oc adm taint nodes node1 node-role.kubernetes.io/infra=reserved:NoSchedule
5757
----
5858
+
5959
[TIP]
@@ -71,33 +71,78 @@ metadata:
7171
spec:
7272
taints:
7373
- key: node-role.kubernetes.io/infra
74-
effect: NoExecute
74+
effect: NoSchedule
7575
value: reserved
7676
...
7777
----
7878
====
7979
+
80-
This example places a taint on `node1` that has key `node-role.kubernetes.io/infra` and taint effect `NoSchedule`. Nodes with the `NoSchedule` effect schedule only pods that tolerate the taint, but allow existing pods to remain scheduled on the node.
80+
This example places a taint on `node1` that has key `node-role.kubernetes.io/infra` and taint effect `NoSchedule`. Nodes with the `NoSchedule` effect schedule only pods that tolerate the taint, but allow existing pods to remain scheduled on the node.
8181
+
8282
[NOTE]
8383
====
8484
If a descheduler is used, pods violating node taints could be evicted from the cluster.
8585
====
8686

87+
.. Add the taint with NoExecute Effect along with the above taint with NoSchedule Effect:
88+
+
89+
[source,terminal]
90+
----
91+
$ oc adm taint nodes <node_name> <key>=<value>:<effect>
92+
----
93+
+
94+
For example:
95+
+
96+
[source,terminal]
97+
----
98+
$ oc adm taint nodes node1 node-role.kubernetes.io/infra=reserved:NoExecute
99+
----
100+
+
101+
[TIP]
102+
====
103+
You can alternatively apply the following YAML to add the taint:
104+
105+
[source,yaml]
106+
----
107+
kind: Node
108+
apiVersion: v1
109+
metadata:
110+
name: <node_name>
111+
labels:
112+
...
113+
spec:
114+
taints:
115+
- key: node-role.kubernetes.io/infra
116+
effect: NoExecute
117+
value: reserved
118+
...
119+
----
120+
====
121+
+
122+
This example places a taint on `node1` that has the key `node-role.kubernetes.io/infra` and taint effect `NoExecute`. Nodes with the `NoExecute` effect schedule only pods that tolerate the taint. The effect will remove any existing pods from the node that do not have a matching toleration.
123+
+
124+
125+
87126
. Add tolerations for the pod configurations you want to schedule on the infra node, like router, registry, and monitoring workloads. Add the following code to the `Pod` object specification:
88127
+
89128
[source,yaml]
90129
----
91130
tolerations:
92-
- effect: NoExecute <1>
131+
- effect: NoSchedule <1>
93132
key: node-role.kubernetes.io/infra <2>
94-
operator: Exists <3>
95-
value: reserved <4>
133+
value: reserved <3>
134+
- effect: NoExecute <4>
135+
key: node-role.kubernetes.io/infra <5>
136+
operator: Exists <6>
137+
value: reserved <7>
96138
----
97139
<1> Specify the effect that you added to the node.
98140
<2> Specify the key that you added to the node.
99-
<3> Specify the `Exists` Operator to require a taint with the key `node-role.kubernetes.io/infra` to be present on the node.
100-
<4> Specify the value of the key-value pair taint that you added to the node.
141+
<3> Specify the value of the key-value pair taint that you added to the node.
142+
<4> Specify the effect that you added to the node.
143+
<5> Specify the key that you added to the node.
144+
<6> Specify the `Exists` Operator to require a taint with the key `node-role.kubernetes.io/infra` to be present on the node.
145+
<7> Specify the value of the key-value pair taint that you added to the node.
101146
+
102147
This toleration matches the taint created by the `oc adm taint` command. A pod with this toleration can be scheduled onto the infra node.
103148
+

0 commit comments

Comments
 (0)