Improve Taints and Tolerations example
parent
11d11a6adc
commit
937ddcea5a
|
@ -32,15 +32,15 @@ You add a taint to a node using [kubectl taint](/docs/reference/generated/kubect
|
|||
For example,
|
||||
|
||||
```shell
|
||||
kubectl taint nodes node1 key=value:NoSchedule
|
||||
kubectl taint nodes node1 key1=value1:NoSchedule
|
||||
```
|
||||
|
||||
places a taint on node `node1`. The taint has key `key`, value `value`, and taint effect `NoSchedule`.
|
||||
places a taint on node `node1`. The taint has key `key1`, value `value1`, and taint effect `NoSchedule`.
|
||||
This means that no pod will be able to schedule onto `node1` unless it has a matching toleration.
|
||||
|
||||
To remove the taint added by the command above, you can run:
|
||||
```shell
|
||||
kubectl taint nodes node1 key=value:NoSchedule-
|
||||
kubectl taint nodes node1 key1=value1:NoSchedule-
|
||||
```
|
||||
|
||||
You specify a toleration for a pod in the PodSpec. Both of the following tolerations "match" the
|
||||
|
@ -49,15 +49,15 @@ to schedule onto `node1`:
|
|||
|
||||
```yaml
|
||||
tolerations:
|
||||
- key: "key"
|
||||
- key: "key1"
|
||||
operator: "Equal"
|
||||
value: "value"
|
||||
value: "value1"
|
||||
effect: "NoSchedule"
|
||||
```
|
||||
|
||||
```yaml
|
||||
tolerations:
|
||||
- key: "key"
|
||||
- key: "key1"
|
||||
operator: "Exists"
|
||||
effect: "NoSchedule"
|
||||
```
|
||||
|
@ -80,7 +80,7 @@ There are two special cases:
|
|||
An empty `key` with operator `Exists` matches all keys, values and effects which means this
|
||||
will tolerate everything.
|
||||
|
||||
An empty `effect` matches all effects with key `key`.
|
||||
An empty `effect` matches all effects with key `key1`.
|
||||
|
||||
{{< /note >}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue