Start and stop an Azure Kubernetes Service (AKS) node pool
You might not need to continuously run your AKS workloads. For example, you might have a development cluster that has node pools running specific workloads. To optimize your compute costs, you can completely stop your node pools in your AKS cluster.
Features and limitations
- You can't stop system pools.
- Spot node pools are supported.
- Stopped node pools can be upgraded.
- The cluster and node pool must be running.
- You can't stop node pools from clusters which use the Node Autoprovisioning (NAP) feature.
Before you begin
This article assumes you have an existing AKS cluster. If you need an AKS cluster, create one using the Azure CLI, Azure PowerShell, or the Azure portal.
Stop an AKS node pool
Stop a running AKS node pool using the
az aks nodepool stop
command.az aks nodepool stop --resource-group myResourceGroup --cluster-name myAKSCluster --nodepool-name testnodepool
Verify your node pool stopped using the
az aks nodepool show
command.az aks nodepool show --resource-group myResourceGroup --cluster-name myAKSCluster --nodepool-name testnodepool
The following condensed example output shows the
powerState
asStopped
:{ [...] "osType": "Linux", "podSubnetId": null, "powerState": { "code": "Stopped" }, "provisioningState": "Succeeded", "proximityPlacementGroupId": null, [...] }
Note
If the
provisioningState
showsStopping
, your node pool is still in the process of stopping.Note
Stopping the node pool will stop its Cluster Autoscaler, and starts it back when starting the node pool. So if you manually modify the number of VMSS instances in the pool while it's stopped, Cluster Autoscaler might show inconsistencies.
Start a stopped AKS node pool
Restart a stopped node pool using the
az aks nodepool start
command.az aks nodepool start --resource-group myResourceGroup --cluster-name myAKSCluster --nodepool-name testnodepool
Verify your node pool started using the
az aks nodepool show
command.az aks nodepool show --resource-group myResourceGroup --cluster-name myAKSCluster --nodepool-name testnodepool
The following condensed example output shows the
powerState
asRunning
:{ [...] "osType": "Linux", "podSubnetId": null, "powerState": { "code": "Running" }, "provisioningState": "Succeeded", "proximityPlacementGroupId": null, [...] }
Note
If the
provisioningState
showsStarting
, your node pool is still in the process of starting.
Next steps
- To learn how to scale
User
pools to 0, see scaleUser
pools to 0. - To learn how to stop your cluster, see cluster start/stop.
- To learn how to save costs using Spot instances, see add a spot node pool to AKS.
- To learn more about the AKS support policies, see AKS support policies.