Skip to content

Commit 41fcb38

Browse files
committed
Node taints and node init taints content
1 parent 744c208 commit 41fcb38

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

articles/aks/use-node-taints.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ This article describes how to use node taints in an Azure Kubernetes Service (AK
1414

1515
## Overview
1616

17-
The AKS scheduling mechanism is responsible for placing pods onto nodes and is based upon the upstream Kubernetes scheduler, [kube-scheduler](https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/). You can constrain a pod to run on particular nodes by either attracting the pods to a set of nodes using [node affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity), or by instructing the node to repel a set of pods using [node taints](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/), which interact with the AKS scheduler.
17+
The AKS scheduling mechanism is responsible for placing pods onto nodes and is based upon the upstream Kubernetes scheduler, [kube-scheduler](https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/). You can constrain a pod to run on particular nodes by attaching the pods to a set of nodes using [node affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) or by instructing the node to repel a set of pods using [node taints](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/), which interact with the AKS scheduler.
1818

1919
Node taints work by marking a node so that the scheduler avoids placing certain pods on the marked nodes. You can place [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) on a pod to allow the scheduler to schedule that pod on a node with a matching taint. Taints and tolerations work together to help you control how the scheduler places pods onto nodes. For more information, see [example use cases of taints and tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/#example-use-cases:~:text=not%20be%20evicted.-,Example%20Use%20Cases,-Taints%20and%20tolerations).
2020

2121
Taints are key-value pairs with an [effect](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/). There are three values for the effect field when using node taints: `NoExecute`, `NoSchedule`, and `PreferNoSchedule`.
2222

23-
* `NoExecute`: Pods already running on the node will be evicted immediately if they don't have a matching toleration. If a pod has a matching toleration, it might be evicted if `tolerationSeconds` have been specified.
24-
* `NoSchedule`: Only pods with a matching toleration will be placed on this node. Existing pods will not be evicted.
25-
* `PreferNoSchedule`: The scheduler will avoid placing any pods that don't have a matching toleration.
23+
* `NoExecute`: Pods already running on the node are immediately evicted if they don't have a matching toleration. If a pod has a matching toleration, it might be evicted if `tolerationSeconds` are specified.
24+
* `NoSchedule`: Only pods with a matching toleration are placed on this node. Existing pods aren't evicted.
25+
* `PreferNoSchedule`: The scheduler avoids placing any pods that don't have a matching toleration.
2626

2727
### Node taint options
2828

2929
There are two types of node taints that can be applied to your AKS nodes: **node taints** and **node initialization taints**.
3030

3131
* **Node taints** are meant to remain permanently on the node for scheduling pods with node affinity. Node taints can only be added, updated, or removed completely using the AKS API.
32-
* **Node initialization taints** are placed on the node at boot time and are meant to be used temporarily, such as in scenarios where you might need extra time to set up your nodes. Node initialization taints can be removed using the Kubernetes API and will not be guaranteed during the node lifecycle. They will appear only after a node is scaled up or upgraded/reimaged. After scaling, new nodes will still have the node initialization taint. After upgrade, node initialization taints will appear on all nodes. If you want to remove the initialization taints completely, you can remove them using the AKS API after untainting the nodes using the Kubernetes API. Once the initialization taints are removed from the cluster spec using the AKS API, newly created nodes will not come up with those initialization taints. If the initialization taint is still present on existing nodes, you can permanently remove it by performing a node image upgrade operation.
32+
* **Node initialization taints** are placed on the node at boot time and are meant to be used temporarily, such as in scenarios where you might need extra time to set up your nodes. You can remove node initialization taint using the Kubernetes API and aren't guaranteed during the node lifecycle. They appear only after a node is scaled up or upgraded/reimaged. New nodes still have the node initialization taint after scaling. Node initialization taints appear on all nodes after upgrading. If you want to remove the initialization taints completely, you can remove them using the AKS API after untainting the nodes using the Kubernetes API. Once you remove the initialization taints from the cluster spec using the AKS API, newly created nodes don't come up with those initialization taints. If the initialization taint is still present on existing nodes, you can permanently remove it by performing a node image upgrade operation.
3333

3434
> [!NOTE]
3535
>
@@ -58,7 +58,7 @@ This article assumes you have an existing AKS cluster. If you need an AKS cluste
5858
```
5959
6060
2. [Check the status of the node pool](#check-the-status-of-the-node-pool).
61-
3. [Check that the taint has been set on the node](#check-that-the-taint-has-been-set-on-the-node).
61+
3. [Check that the taint is set on the node](#check-that-the-taint-is-set-on-the-node).
6262
6363
### Update a node pool to add a node taint
6464
@@ -144,7 +144,7 @@ This article assumes you have an existing AKS cluster. If you need an AKS cluste
144144
```
145145
146146
2. [Check the status of the node pool](#check-the-status-of-the-node-pool).
147-
3. [Check that the taint has been set on the node](#check-that-the-taint-has-been-set-on-the-node).
147+
3. [Check that the taint is set on the node](#check-that-the-taint-is-set-on-the-node).
148148
149149
### Update a cluster to add a node initialization taint
150150
@@ -161,7 +161,7 @@ This article assumes you have an existing AKS cluster. If you need an AKS cluste
161161
```
162162
163163
2. [Check the status of the node pool](#check-the-status-of-the-node-pool).
164-
3. [Check that the taint has been set on the node](#check-that-the-taint-has-been-set-on-the-node).
164+
3. [Check that the taint is set on the node](#check-that-the-taint-is-set-on-the-node).
165165
166166
## Check the status of the node pool
167167
@@ -215,7 +215,7 @@ This article assumes you have an existing AKS cluster. If you need an AKS cluste
215215
]
216216
```
217217
218-
## Check that the taint has been set on the node
218+
## Check that the taint is set on the node
219219
220220
* Check the node taints and node initialization taints in the node configuration using the `kubectl describe node` command.
221221
@@ -266,16 +266,16 @@ This article assumes you have an existing AKS cluster. If you need an AKS cluste
266266
267267
You have the following options to remove node initialization taints from the node:
268268
269-
* **Remove node initialization taints temporarily** using the Kubernetes API. If you remove them this way, the taints reappear after node scaling or upgrade occurs. After scaling, new nodes still have the node initialization taint. After upgrading, node initialization taints appear on all nodes.
269+
* **Remove node initialization taints temporarily** using the Kubernetes API. If you remove them this way, the taints reappear after node scaling or upgrade occurs. New nodes still have the node initialization taint after scaling. Node initialization taints appear on all nodes after upgrading.
270270
* **Remove node initialization taints permanently** by untainting the node using the Kubernetes API, and then removing the taint using the AKS API. Once the initialization taints are removed from cluster spec using AKS API, newly created nodes after reimage operations no longer have initialization taints.
271271
272-
You remove all initialization taint occurrences from node pool replicas, the existing initialization taint might reappear after an upgrade with any new initialization taints.
272+
When you remove all initialization taint occurrences from node pool replicas, the existing initialization taint might reappear after an upgrade with any new initialization taints.
273273
274274
### Remove node initialization taints temporarily
275275
276276
* Remove node initialization taints temporarily using the `kubectl taint nodes` command.
277277
278-
This command will remove the taint from only the specified node. If you want to remove the taint from every node in the node pool, you need to run the command for every node that you want the taint removed from.
278+
This command removes the taint from only the specified node. If you want to remove the taint from every node in the node pool, you need to run the command for every node that you want the taint removed from.
279279
280280
```bash
281281
kubectl taint nodes $NODE_POOL_NAME sku=gpu:NoSchedule-
@@ -304,7 +304,7 @@ You remove all initialization taint occurrences from node pool replicas, the exi
304304
kubectl describe node $NODE_NAME
305305
```
306306
307-
If you've removed a node taint, the following example output shows that the `<node-pool-name>` node pool doesn't have the removed taint under `Taints`:
307+
If you removed a node taint, the following example output shows that the `<node-pool-name>` node pool doesn't have the removed taint under `Taints`:
308308
309309
```output
310310
[

0 commit comments

Comments
 (0)