AKS Scheduling Features
Azure Kubernetes Service enhances Kubernetes’ native scheduling capabilities with several platform-specific features that provide greater flexibility for workload placement and resource allocation.
Node Pools in AKS
Node pools allow you to create heterogeneous clusters with different VM types, configurations, and purposes. This capability enables more precise workload placement and resource allocation.
Node Pool Feature | Description | Benefits |
---|---|---|
Multiple VM sizes | Different node pools can use different VM SKUs | Optimize cost and performance for specific workload needs |
Specialized hardware | Create pools with GPUs, fast storage, or high memory | Run specialized workloads without paying a premium for all nodes |
Separate scaling | Scale node pools independently | Adjust capacity precisely for different workload types |
Lifecycle management | Upgrade node pools separately | Reduce risk by testing upgrades on non-critical pools first |
Example: Creating a specialized GPU node pool in AKS:
az aks nodepool add \
--resource-group myResourceGroup \
--cluster-name myAKSCluster \
--name gpunodepool \
--node-count 3 \
--node-vm-size Standard_NC6 \
--labels nodepurpose=gpu \
--no-wait
Automatic Node Taints and Specialized Pools
AKS applies automatic taints to specialized node types to ensure proper workload placement. This prevents unsuitable workloads from being scheduled on nodes with special capabilities or purposes.
Node Type | Automatic Taint | Purpose |
---|---|---|
GPU nodes | sku=gpu:NoSchedule | Prevent non-GPU workloads from consuming expensive GPU VMs |
Windows nodes | os=windows:NoSchedule | Ensure only Windows containers run on Windows nodes |
System nodes | CriticalAddonsOnly=true:NoSchedule | Protect system services from user workloads |
When creating workloads for these specialized nodes, you must include the appropriate tolerations in your pod specifications.
AKS Virtual Nodes (Serverless)
AKS virtual nodes (powered by Azure Container Instances) introduce a different scheduling paradigm:
- Provides serverless container hosting integrated with your AKS cluster
- Allows rapid, near-instant scaling without waiting for nodes to provision
- Useful for burst workloads, batch processing, and cost optimization
To schedule to virtual nodes, use node selectors:
nodeSelector:
kubernetes.io/role: virtual-node
kubernetes.azure.com/mode: virtual
Spot VM Node Pools
AKS supports Spot VM node pools for cost-efficient, non-critical workloads:
- Significantly lower cost (up to 90% discount)
- Subject to eviction with 30-second notice
- Ideal for batch jobs, CI/CD runners, and fault-tolerant workloads
These pools automatically apply the taint kubernetes.azure.com/scalesetpriority=spot:NoSchedule
, requiring matching tolerations for pods.