You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Configure multiple nodes and enable scale-to-zero by using AKS
4
-
5
-
metadata:
6
-
title: Configure multiple nodes and enable scale-to-zero by using AKS
7
-
description: You can configure multiple node pools on Azure Kubernetes Service (AKS) to run specific workloads. Node pools use virtual scale sets that allow you to set the number of nodes in a node pool. You can set the node count in a user node pool to zero to optimize your cluster's running costs when nodes aren't needed. Here you'll explore how to configure a user node pool to scale its node count to zero.
8
-
ms.date: 12/20/2023
9
-
author: Nickomang
10
-
ms.author: nickoman
11
-
ms.topic: unit
12
-
13
-
durationInMinutes: 6
14
-
content: |
15
-
[!include[](includes/2-node-pools.md)]
16
-
quiz:
17
-
title: Check your knowledge
18
-
questions:
19
-
20
-
- content: "Suppose your software solution has three critical components. The first component is a web application. The second is a service that processes online orders. The third is a video-rendering and analysis service that runs only as needed and that requires GPU-based VMs. To optimize cost, how many node pools would you deploy in an Azure Kubernetes Service (AKS) cluster to manage the solution?"
21
-
choices:
22
-
- content: "Deploy a single user node pool when you create the AKS cluster. Assign three nodes per component by using GPU-based VMs, for a total of nine nodes in the node pool. Enable autoscaling on the node pool."
23
-
isCorrect: false
24
-
explanation: "A single user node pool doesn't give you enough flexibility to scale different workloads in a cost-effective way."
25
-
- content: "Deploy three user node pools on the AKS cluster. Create the first and second node pools with standard-sized virtual machines (VMs), and create the third node pool with specialized, GPU-based VMs. Enable the cluster autoscaler on all three node pools."
26
-
isCorrect: false
27
-
explanation: "An AKS cluster with three user node pools does give you flexibility to scale the node count in each pool independently. However, you can't scale a node pool to zero after you enable the autoscaler. Use of the GPU-based node pool won't be cost effective for workloads that run only as needed."
28
-
- content: "Deploy three user node pools on the AKS cluster. Create the first and second node pools with standard-sized VMs and the third node pool with specialized, GPU-based VMs. Enable autoscaling on the first two node pools. Scale the GPU-based node pool manually."
29
-
isCorrect: true
30
-
explanation: "An AKS cluster with three user node pools gives you flexibility to scale the node count in each pool independently for each component in the solution. Because you didn't enable the autoscaler on the GPU-based node pool, that pool's node count can be scaled to zero to optimize compute costs."
31
-
32
-
- content: "Complete the following statement. The Kubernetes cluster autoscaler scales..."
33
-
choices:
34
-
- content: "...the number of workload replicas on an AKS cluster. It monitors the Metrics API every 30 seconds to decide whether your application needs additional instances to meet demand."
35
-
isCorrect: false
36
-
explanation: "The horizontal pod autoscaler is responsible for scaling the number of workload replicas on an AKS cluster."
37
-
- content: "...the number of nodes by monitoring the Metrics API. It scales the number of nodes up or down based on computing resources required."
38
-
isCorrect: true
39
-
explanation: "The Kubernetes cluster autoscaler scales the number of nodes up or down based on computing resources required."
40
-
- content: "...the number of node pools on an AKS cluster. It monitors the Metrics API every 30 seconds to decide whether your application needs additional node pools to meet demand."
41
-
isCorrect: false
42
-
explanation: "The decision to add node pools to an AKS cluster is the responsibility of the cluster operator."
43
-
1
+
### YamlMime:ModuleUnit
2
+
uid: learn.aks-optimize-compute-costs.node-pools
3
+
title: Configure multiple nodes and enable scale-to-zero by using AKS
4
+
5
+
metadata:
6
+
title: Configure multiple nodes and enable scale-to-zero by using AKS
7
+
description: You can configure multiple node pools on Azure Kubernetes Service (AKS) to run specific workloads. Node pools use virtual scale sets that allow you to set the number of nodes in a node pool. You can set the node count in a user node pool to zero to optimize your cluster's running costs when nodes aren't needed. Here you'll explore how to configure a user node pool to scale its node count to zero.
8
+
ms.date: 06/02/2025
9
+
author: Nickomang
10
+
ms.author: nickoman
11
+
ms.topic: unit
12
+
13
+
durationInMinutes: 6
14
+
content: |
15
+
[!include[](includes/2-node-pools.md)]
16
+
quiz:
17
+
title: Check your knowledge
18
+
questions:
19
+
20
+
- content: "Suppose your software solution has three critical components. The first component is a web application. The second is a service that processes online orders. The third is a video-rendering and analysis service that runs only as needed and that requires GPU-based VMs. To optimize cost, how many node pools would you deploy in an Azure Kubernetes Service (AKS) cluster to manage the solution?"
21
+
choices:
22
+
- content: "Deploy a single user node pool when you create the AKS cluster. Assign three nodes per component by using GPU-based VMs, for a total of nine nodes in the node pool. Enable autoscaling on the node pool."
23
+
isCorrect: false
24
+
explanation: "A single user node pool doesn't give you enough flexibility to scale different workloads in a cost-effective way."
25
+
- content: "Deploy three user node pools on the AKS cluster. Create the first and second node pools with standard-sized virtual machines (VMs), and create the third node pool with specialized, GPU-based VMs. Enable the cluster autoscaler on all three node pools."
26
+
isCorrect: false
27
+
explanation: "An AKS cluster with three user node pools does give you flexibility to scale the node count in each pool independently. However, you can't scale a node pool to zero after you enable the autoscaler. Using the GPU-based node pool won't be cost effective for workloads that run only as needed."
28
+
- content: "Deploy three user node pools on the AKS cluster. Create the first and second node pools with standard-sized VMs and the third node pool with specialized, GPU-based VMs. Enable autoscaling on the first two node pools. Scale the GPU-based node pool manually."
29
+
isCorrect: true
30
+
explanation: "An AKS cluster with three user node pools gives you flexibility to scale the node count in each pool independently for each component in the solution. Because you didn't enable the autoscaler on the GPU-based node pool, you can scale that pool's node count to zero to optimize compute costs."
31
+
32
+
- content: "Complete the following statement. The Kubernetes cluster autoscaler scales..."
33
+
choices:
34
+
- content: "...the number of workload replicas on an AKS cluster. It monitors the Metrics API every 30 seconds to decide whether your application needs additional instances to meet demand."
35
+
isCorrect: false
36
+
explanation: "The horizontal pod autoscaler is responsible for scaling the number of workload replicas on an AKS cluster."
37
+
- content: "...the number of nodes by monitoring the Metrics API. It scales the number of nodes up or down based on computing resources required."
38
+
isCorrect: true
39
+
explanation: "The Kubernetes cluster autoscaler scales the number of nodes up or down based on computing resources required."
40
+
- content: "...the number of node pools on an AKS cluster. It monitors the Metrics API every 30 seconds to decide whether your application needs additional node pools to meet demand."
41
+
isCorrect: false
42
+
explanation: "The decision to add node pools to an AKS cluster is cluster operator's responsibility."
title: Configure multiple node pools by using AKS spot node pools with the cluster autoscaler
4
-
5
-
metadata:
6
-
title: Configure multiple node pools by using AKS spot node pools with the cluster autoscaler
7
-
description: Use spot VMs for user nodes with your AKS cluster to take advantage of unused capacity in Azure and to optimize costs. Here you'll explore how to configure a spot node pool and enable the autoscaler on the node pool. You'll also see how to deploy a workload that uses the node pool's taint information to schedule the workload on the node pool's nodes.
8
-
ms.date: 12/20/2023
9
-
author: Nickomang
10
-
ms.author: nickoman
11
-
ms.topic: unit
12
-
13
-
durationInMinutes: 11
14
-
content: |
15
-
[!include[](includes/4-spot-node-pools.md)]
16
-
17
-
quiz:
18
-
title: Check your knowledge
19
-
questions:
20
-
21
-
- content: "Suppose you have a stateless service that processes online orders and runs on an Azure Kubernetes Service (AKS) cluster. You decide to use spot node pools on the AKS cluster to optimize compute costs on the cluster. How do you add spot node pools to an AKS cluster?"
22
-
choices:
23
-
- content: "Run the `az aks update` command and specify the `convert-to-spot-vm` parameter."
24
-
isCorrect: false
25
-
explanation: "It isn't possible to convert an existing user node pool to a spot node pool."
26
-
- content: "Use the Azure portal to add a new spot node pool to the AKS cluster."
27
-
isCorrect: false
28
-
explanation: "The Azure portal currently doesn't support the option to add spot node pools. "
29
-
- content: "Run the `az aks nodepool add` command to add a new spot user node pool to the AKS cluster."
30
-
isCorrect: true
31
-
explanation: "Spot node pools must be added to an AKS cluster. They can't be updated, and availability can't be guaranteed, because Azure will allocate VMs to the underlying scale set only if capacity is available."
32
-
33
-
- content: "For the service described in the preceding question, which eviction policy is the most cost-effective option for configuring the spot node pool?"
34
-
choices:
35
-
- content: "Use the `az aks update` command to set the `--eviction-policy` to `Hibernate`."
36
-
isCorrect: false
37
-
explanation: "There's no `Hibernate` eviction policy available for spot nodes."
38
-
- content: "Use the `az aks update` command to set the `--eviction-policy` to `Delete`."
39
-
isCorrect: true
40
-
explanation: "The `Delete` eviction policy enables you to avoid both paying disk costs and hitting quota limits. This option is the most cost effective one to use with spot node pools."
41
-
- content: "Use the `az aks update` command and set the `--eviction-policy` to `Deallocate`."
42
-
isCorrect: false
43
-
explanation: "A deallocated VM keeps counting toward your spot virtual CPU quota, and charges for the underlying, allocated disks still apply. This option isn't the most cost-effective one to use with spot node pools."
44
-
45
-
- content: "For the service described in the preceding questions, how do you ensure that workloads are scheduled on the nodes of the spot user node pool?"
46
-
choices:
47
-
- content: "AKS ensures that new workloads are always scheduled on spot node pools in an AKS cluster. This behavior is the default, and no additional configuration is required."
48
-
isCorrect: false
49
-
explanation: "You configure the workload manifest file with a toleration, which tells the system to schedule the workload on the nodes in the spot node pool."
50
-
- content: "Configure the workload manifest file with a `nodeTaint` value of `kubernetes.azure.com/scalesetpriority=spot:NoSchedule`"
51
-
isCorrect: false
52
-
explanation: "The `nodeTaint` value of `kubernetes.azure.com/scalesetpriority=spot:NoSchedule` is automatically applied to the spot node pool. You configure the workload manifest file with a toleration, which tells the system to schedule the workload on the nodes in the spot node pool."
53
-
- content: "Configure the workload manifest file with a toleration that applies the `NoSchedule` effect. Both the affinity and toleration use the key `kubernetes.azure.com/scalesetpriority`. This configuration tells the system to schedule the workload on the nodes in the spot node pool."
54
-
isCorrect: true
55
-
explanation: "You configure the workload manifest file with a toleration and node affinity as described."
title: Configure multiple node pools by using AKS spot node pools with the cluster autoscaler
4
+
5
+
metadata:
6
+
title: Configure multiple node pools by using AKS spot node pools with the cluster autoscaler
7
+
description: Use spot VMs for user nodes with your AKS cluster to take advantage of unused capacity in Azure and to optimize costs. Here you'll explore how to configure a spot node pool and enable the autoscaler on the node pool. You'll also see how to deploy a workload that uses the node pool's taint information to schedule the workload on the node pool's nodes.
8
+
ms.date: 06/02/2025
9
+
author: Nickomang
10
+
ms.author: nickoman
11
+
ms.topic: unit
12
+
13
+
durationInMinutes: 11
14
+
content: |
15
+
[!include[](includes/4-spot-node-pools.md)]
16
+
17
+
quiz:
18
+
title: Check your knowledge
19
+
questions:
20
+
21
+
- content: "Suppose you have a stateless service that processes online orders and runs on an Azure Kubernetes Service (AKS) cluster. You decide to use spot node pools on the AKS cluster to optimize compute costs on the cluster. How do you add spot node pools to an AKS cluster?"
22
+
choices:
23
+
- content: "Run the `az aks update` command and specify the `convert-to-spot-vm` parameter."
24
+
isCorrect: false
25
+
explanation: "It isn't possible to convert an existing user node pool to a spot node pool."
26
+
- content: "Use the Azure portal to add a new spot node pool to the AKS cluster."
27
+
isCorrect: false
28
+
explanation: "The Azure portal currently doesn't support the option to add spot node pools. "
29
+
- content: "Run the `az aks nodepool add` command to add a new spot user node pool to the AKS cluster."
30
+
isCorrect: true
31
+
explanation: "Spot node pools must be added to an AKS cluster. They can't be updated, and availability can't be guaranteed, because Azure will allocate VMs to the underlying scale set only if capacity is available."
32
+
33
+
- content: "For the service described in the preceding question, which eviction policy is the most cost-effective option for configuring the spot node pool?"
34
+
choices:
35
+
- content: "Use the `az aks update` command to set the `--eviction-policy` to `Hibernate`."
36
+
isCorrect: false
37
+
explanation: "There's no `Hibernate` eviction policy available for spot nodes."
38
+
- content: "Use the `az aks update` command to set the `--eviction-policy` to `Delete`."
39
+
isCorrect: true
40
+
explanation: "The `Delete` eviction policy allows you to avoid both paying disk costs and hitting quota limits. This option is the most cost effective one to use with spot node pools."
41
+
- content: "Use the `az aks update` command and set the `--eviction-policy` to `Deallocate`."
42
+
isCorrect: false
43
+
explanation: "A deallocated VM still counts toward your spot virtual CPU quota, and charges for the underlying, allocated disks still apply. This option isn't the most cost-effective one to use with spot node pools."
44
+
45
+
- content: "For the service described in the preceding questions, how do you ensure that workloads are scheduled on the nodes of the spot user node pool?"
46
+
choices:
47
+
- content: "AKS ensures that new workloads are always scheduled on spot node pools in an AKS cluster. This behavior is the default, and no additional configuration is required."
48
+
isCorrect: false
49
+
explanation: "You configure the workload manifest file with a toleration, which tells the system to schedule the workload on the nodes in the spot node pool."
50
+
- content: "Configure the workload manifest file with a `nodeTaint` value of `kubernetes.azure.com/scalesetpriority=spot:NoSchedule`"
51
+
isCorrect: false
52
+
explanation: "The `nodeTaint` value of `kubernetes.azure.com/scalesetpriority=spot:NoSchedule` is automatically applied to the spot node pool. You configure the workload manifest file with a toleration, which tells the system to schedule the workload on the nodes in the spot node pool."
53
+
- content: "Configure the workload manifest file with a toleration that applies the `NoSchedule` effect. Both the affinity and toleration use the key `kubernetes.azure.com/scalesetpriority`. This configuration tells the system to schedule the workload on the nodes in the spot node pool."
54
+
isCorrect: true
55
+
explanation: "You configure the workload manifest file with a toleration and node affinity as described."
0 commit comments