In Azure Kubernetes Service (AKS) on Azure Stack HCI, you can increase the resources available to your node pool by changing the size of virtual machines in a node pool or expanding the node count. The node count can also be increased with autoscaling methods.
The worker nodes can be scaled using the command Set-AksHciNodePool, while the Set-AksHciCluster scales the control plane.
I’ll be going over scaling both using PowerShell in the following guide. You’ll need to open a PowerShell session on one of the Azure Stack HCI nodes to follow along. Replace the parameter values as needed.
Notes
- As of January 2023, the scaling of the management cluster (the one created by AKS HCI automatically) is currently not supported.
- At the time of writing, the “-vmsize” argument used with Set-AksHciNodePool is not documented in the command docs (Set-AksHciNodePool | Microsoft Docs) but is only referenced in this article: Scale up a worker node | AKS HCI Docs
Scale the Control Plane
Now we’ll scale up the current cluster. You’ll see the control plane VM size under ControlPlaneVmSize.
Get-AksHciCluster -name akshci01
Status : {ProvisioningState, Details}
ProvisioningState : Deployed
KubernetesVersion : v1.23.8
PackageVersion : v1.23.8
NodePools : linuxnodepool
WindowsNodeCount : 0
LinuxNodeCount : 4
ControlPlaneNodeCount : 1
ControlPlaneVmSize : Standard_D2s_v3
AutoScalerEnabled : False
AutoScalerProfile :
LoadBalancer : {VMSize, Count, Sku}
Name : akshci01
You’ll only be allowed to scale up the control plane to the available VM sizes. To get which sizes are availabe, use Get-AksHciVmSize.
Get-AksHciVmSize
VmSize CPU MemoryGB
------ --- --------
Default 4 4
Standard_A2_v2 2 4
Standard_A4_v2 4 8
Standard_D2s_v3 2 8
Standard_D4s_v3 4 16
Standard_D8s_v3 8 32
Standard_D16s_v3 16 64
Standard_D32s_v3 32 128
Standard_DS2_v2 2 7
Standard_DS3_v2 2 14
Standard_DS4_v2 8 28
Standard_DS5_v2 16 56
Standard_DS13_v2 8 56
Standard_K8S_v1 4 2
Standard_K8S2_v1 2 2
Standard_K8S3_v1 4 6
In this example we’ll scale up to a D4s_v3.
Set-AksHciCluster -name akshci01 -controlPlaneVmSize Standard_D4s_v3
Status : {ProvisioningState, Details}
ProvisioningState : Deployed
KubernetesVersion : v1.23.8
PackageVersion : v1.23.8
NodePools : linuxnodepool
WindowsNodeCount : 0
LinuxNodeCount : 4
ControlPlaneNodeCount : 1
ControlPlaneVmSize : Standard_D4s_v3
AutoScalerEnabled : False
AutoScalerProfile :
LoadBalancer : {VMSize, Count, Sku}
Name : akshci01
Now that we have scaled up the control plane, we can scale the control plane node count. The default is 1. If you scale up the control plane, it will become highly available and will not accept any scale down back to 1 node⚠️
Set-AksHciCluster -name akshci01 -controlPlaneNodeCount 3
Status : {ProvisioningState, Details}
ProvisioningState : Deployed
KubernetesVersion : v1.23.8
PackageVersion : v1.23.8
NodePools : linuxnodepool
WindowsNodeCount : 0
LinuxNodeCount : 4
ControlPlaneNodeCount : 3
ControlPlaneVmSize : Standard_D4s_v3
AutoScalerEnabled : False
AutoScalerProfile :
LoadBalancer : {VMSize, Count, Sku}
Name : akshci01
Scale worker nodes
Now we’ll do the same thing we did for the control plane with the worker nodes. Here we’ll get the default VM size for the cluster.
Get-AksHciNodePool -clusterName $aksclustername
Status : {Phase, Details}
ClusterName : akshci01
NodePoolName : linuxnodepool
Version : v1.23.8
OsType : Linux
NodeCount : 2
VmSize : Standard_K8S3_v1
Phase : Deployed
AutoScalerEnabled : False
You’ll only be allowed to scale up the worker nodes to the available VM sizes. To get which sizes are availabe, use Get-AksHciVmSize.
Get-AksHciVmSize
VmSize CPU MemoryGB
------ --- --------
Default 4 4
Standard_A2_v2 2 4
Standard_A4_v2 4 8
Standard_D2s_v3 2 8
Standard_D4s_v3 4 16
Standard_D8s_v3 8 32
Standard_D16s_v3 16 64
Standard_D32s_v3 32 128
Standard_DS2_v2 2 7
Standard_DS3_v2 2 14
Standard_DS4_v2 8 28
Standard_DS5_v2 16 56
Standard_DS13_v2 8 56
Standard_K8S_v1 4 2
Standard_K8S2_v1 2 2
Standard_K8S3_v1 4 6
Now that we know which sizes are supported, we can scale up the cluster nodes. All preexistent nodes will be scaled up ⚠️
Set-AksHciNodePool -ClusterName "akshci01" -name "linuxnodepool" -vmsize "Standard_DS13_v2"
Status : {Phase, Details}
ClusterName : akshci01
NodePoolName : linuxnodepool
Version : v1.23.8
OsType : Linux
NodeCount : 2
VmSize : Standard_DS13_v2
Phase : Deployed
AutoScalerEnabled : False
Now that we have scaled up, we can scale the workload node count. The current node count depends on what you have set during setup.
Set-AksHciNodePool -clusterName "akshci01" -name linuxnodepool -count 4
Status : {Phase, Details}
ClusterName : akshci01
NodePoolName : linuxnodepool
Version : v1.23.8
OsType : Linux
NodeCount : 4
VmSize : Standard_DS13_v2
Phase : Deployed
AutoScalerEnabled : False