Skip to content

Commit ba05ad2

Browse files
committed
[AKS] added label and taint details for spot node pools
1 parent 29e46b3 commit ba05ad2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

articles/aks/spot-node-pool.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ The following limitations apply when you create and manage AKS clusters with a s
8585
* A spot node pool must use Virtual Machine Scale Sets.
8686
* You cannot change ScaleSetPriority or SpotMaxPrice after creation.
8787
* When setting SpotMaxPrice, the value must be -1 or a positive value with up to five decimal places.
88-
* A spot node pool will have the label *scalesetpriority:spot*, the taint *scalesetpriority=spot:NoSchedule*, and system pods will have anti-affinity.
88+
* A spot node pool will have the label *kubernetes.azure.com/scalesetpriority:spot*, the taint *kubernetes.azure.com/scalesetpriority=spot:NoSchedule*, and system pods will have anti-affinity.
89+
* You must add a [corresponding toleration][spot-toleration] to schedule workloads on a spot node pool.
8990

9091
## Add a spot node pool to an AKS cluster
9192

@@ -111,7 +112,7 @@ By default, you create a node pool with a *priority* of *Regular* in your AKS cl
111112
The command also enables the [cluster autoscaler][cluster-autoscaler], which is recommended to use with spot node pools. Based on the workloads running in your cluster, the cluster autoscaler scales up and scales down the number of nodes in the node pool. For spot node pools, the cluster autoscaler will scale up the number of nodes after an eviction if additional nodes are still needed. If you change the maximum number of nodes a node pool can have, you also need to adjust the `maxCount` value associated with the cluster autoscaler. If you do not use a cluster autoscaler, upon eviction, the spot pool will eventually decrease to zero and require a manual operation to receive any additional spot nodes.
112113

113114
> [!Important]
114-
> Only schedule workloads on spot node pools that can handle interruptions, such as batch processing jobs and testing environments. It is recommended that you set up [taints and tolerations][taints-tolerations] on your spot node pool to ensure that only workloads that can handle node evictions are scheduled on a spot node pool. For example, the above command ny default adds a taint of *scalesetpriority=spot:NoSchedule* so only pods with a corresponding toleration are scheduled on this node.
115+
> Only schedule workloads on spot node pools that can handle interruptions, such as batch processing jobs and testing environments. It is recommended that you set up [taints and tolerations][taints-tolerations] on your spot node pool to ensure that only workloads that can handle node evictions are scheduled on a spot node pool. For example, the above command ny default adds a taint of *kubernetes.azure.com/scalesetpriority=spot:NoSchedule* so only pods with a corresponding toleration are scheduled on this node.
115116
116117
## Verify the spot node pool
117118

@@ -123,14 +124,14 @@ az aks nodepool show --resource-group myResourceGroup --cluster-name myAKSCluste
123124

124125
Confirm *scaleSetPriority* is *Spot*.
125126

126-
To schedule a pod to run on a spot node, add a toleration that corresponds to the taint applied to your spot node. The following example shows a portion of a yaml file that defines a toleration that corresponds to a *scalesetpriority=spot:NoSchedule* taint used in the previous step.
127+
To schedule a pod to run on a spot node, add a toleration that corresponds to the taint applied to your spot node. The following example shows a portion of a yaml file that defines a toleration that corresponds to a *kubernetes.azure.com/scalesetpriority=spot:NoSchedule* taint used in the previous step.
127128

128129
```yaml
129130
spec:
130131
containers:
131132
- name: spot-example
132133
tolerations:
133-
- key: "scalesetpriority"
134+
- key: "kubernetes.azure.com/scalesetpriority"
134135
operator: "Equal"
135136
value: "spot"
136137
effect: "NoSchedule"
@@ -169,6 +170,7 @@ In this article, you learned how to add a spot node pool to an AKS cluster. For
169170
[pricing-linux]: https://azure.microsoft.com/pricing/details/virtual-machine-scale-sets/linux/
170171
[pricing-spot]: ../virtual-machine-scale-sets/use-spot.md#pricing
171172
[pricing-windows]: https://azure.microsoft.com/pricing/details/virtual-machine-scale-sets/windows/
173+
[spot-toleration]: #verify-the-spot-node-pool
172174
[taints-tolerations]: operator-best-practices-advanced-scheduler.md#provide-dedicated-nodes-using-taints-and-tolerations
173175
[use-multiple-node-pools]: use-multiple-node-pools.md
174176
[vmss-spot]: ../virtual-machine-scale-sets/use-spot.md

0 commit comments

Comments
 (0)