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
Copy file name to clipboardExpand all lines: articles/aks/scale-down-mode.md
+12-14Lines changed: 12 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,14 +3,14 @@ title: Use Scale-down Mode for your Azure Kubernetes Service (AKS) cluster
3
3
titleSuffix: Azure Kubernetes Service
4
4
description: Learn how to use Scale-down Mode in Azure Kubernetes Service (AKS).
5
5
ms.topic: article
6
-
ms.date: 09/01/2021
6
+
ms.date: 08/21/2023
7
7
ms.author: qpetraroia
8
8
author: qpetraroia
9
9
---
10
10
11
11
# Use Scale-down Mode to delete/deallocate nodes in Azure Kubernetes Service (AKS)
12
12
13
-
By default, scale-up operations performed manually or by the cluster autoscaler require the allocation and provisioning of new nodes, and scale-down operations delete nodes. Scale-down Mode allows you to decide whether you would like to delete or deallocate the nodes in your Azure Kubernetes Service (AKS) cluster upon scaling down.
13
+
By default, scale-up operations performed manually or by the cluster autoscaler require the allocation and provisioning of new nodes, and scale-down operations delete nodes. Scale-down Mode allows you to decide whether you would like to delete or deallocate the nodes in your Azure Kubernetes Service (AKS) cluster upon scaling down.
14
14
15
15
When an Azure VM is in the `Stopped` (deallocated) state, you will not be charged for the VM compute resources. However, you'll still need to pay for any OS and data storage disks attached to the VM. This also means that the container images will be preserved on those nodes. For more information, see [States and billing of Azure Virtual Machines][state-billing-azure-vm]. This behavior allows for faster operation speeds, as your deployment uses cached images. Scale-down Mode removes the need to pre-provision nodes and pre-pull container images, saving you compute cost.
16
16
@@ -24,16 +24,16 @@ This article assumes that you have an existing AKS cluster. If you need an AKS c
24
24
25
25
### Limitations
26
26
27
-
-[Ephemeral OS][ephemeral-os] disks aren't supported. Be sure to specify managed OS disks via`--node-osdisk-type Managed` when creating a cluster or node pool.
27
+
-[Ephemeral OS][ephemeral-os] disks aren't supported. Be sure to specify managed OS disks by including the argument`--node-osdisk-type Managed` when creating a cluster or node pool.
28
28
29
29
> [!NOTE]
30
30
> Previously, while Scale-down Mode was in preview, [spot node pools][spot-node-pool] were unsupported. Now that Scale-down Mode is Generally Available, this limitation no longer applies.
31
31
32
32
## Using Scale-down Mode to deallocate nodes on scale-down
33
33
34
-
By setting `--scale-down-mode Deallocate`, nodes will be deallocated during a scale-down of your cluster/node pool. All deallocated nodes are stopped. When your cluster/node pool needs to scale up, the deallocated nodes will be started first before any new nodes are provisioned.
34
+
By setting `--scale-down-mode Deallocate`, nodes will be deallocated during a scale-down of your cluster/node pool. All deallocated nodes are stopped. When your cluster/node pool needs to scale up, the deallocated nodes are started first before any new nodes are provisioned.
35
35
36
-
In this example, we create a new node pool with 20 nodes and specify that upon scale-down, nodes are to be deallocated via`--scale-down-mode Deallocate`.
36
+
In this example, we create a new node pool with 20 nodes and specify that upon scale-down, nodes are to be deallocated using the argument`--scale-down-mode Deallocate`.
37
37
38
38
```azurecli-interactive
39
39
az aks nodepool add --node-count 20 --scale-down-mode Deallocate --node-osdisk-type Managed --max-pods 10 --name nodepool2 --cluster-name myAKSCluster --resource-group myResourceGroup
@@ -45,6 +45,12 @@ By scaling the node pool and changing the node count to 5, we'll deallocate 15 n
45
45
az aks nodepool scale --node-count 5 --name nodepool2 --cluster-name myAKSCluster --resource-group myResourceGroup
46
46
```
47
47
48
+
To deallocate Windows nodes during scale-down, run the following command. The default behavior is consistent with Linux nodes, where nodes are [deleted during scale-down](#using-scale-down-mode-to-delete-nodes-on-scale-down).
49
+
50
+
```azurecli-interactive
51
+
az aks nodepool add --node-count 20 --scale-down-mode Deallocate --os-type Windows --node-osdisk-type Managed --max-pods 10 --name npwin2 --cluster-name myAKSCluster --resource-group myResourceGroup
52
+
```
53
+
48
54
### Deleting previously deallocated nodes
49
55
50
56
To delete your deallocated nodes, you can change your Scale-down Mode to `Delete` by setting `--scale-down-mode Delete`. The 15 deallocated nodes will now be deleted.
@@ -60,7 +66,7 @@ az aks nodepool update --scale-down-mode Delete --name nodepool2 --cluster-name
60
66
61
67
The default behavior of AKS without using Scale-down Mode is to delete your nodes when you scale-down your cluster. With Scale-down Mode, this behavior can be explicitly achieved by setting `--scale-down-mode Delete`.
62
68
63
-
In this example, we create a new node pool and specify that our nodes will be deleted upon scale-down via `--scale-down-mode Delete`. Scaling operations will be handled via the cluster autoscaler.
69
+
In this example, we create a new node pool and specify that our nodes will be deleted upon scale-down using the argument `--scale-down-mode Delete`. Scaling operations will be handled using the cluster autoscaler.
0 commit comments