The default OS disk size in Azure Kubernetes Service (AKS) is 100 GiB. While 100 GiB is the standard default, the actual size and type of the OS disk can vary based on the Azure Virtual Machine (VM) SKU selected for your AKS nodes and whether you configure managed or ephemeral OS disks.
Understanding OS Disk Types in AKS
AKS offers two primary types of OS disks for your cluster nodes: Managed OS Disks and Ephemeral OS Disks. Each type has distinct characteristics that impact performance, cost, and the effective size of the disk.
Managed OS Disks
Managed OS disks are the default choice for AKS nodes. These are standard Azure Managed Disks that provide persistent storage for the node's operating system.
- Persistence: The data on a managed OS disk persists even if the VM is deallocated, making it suitable for scenarios where node image changes or reboots might occur frequently.
- Default Size: By default, managed OS disks are provisioned with a size of 100 GiB. This provides ample space for the operating system and basic node components.
- Customization: You can explicitly specify a different size for managed OS disks when creating your node pools, allowing you to optimize for specific needs or costs.
- Automatic Fallback: In cases where an ephemeral OS disk is requested but the VM SKU does not support it (e.g., insufficient cache size for the specified OS disk size), AKS will automatically default to using managed OS disks to ensure cluster functionality. For instance, if you select a VM size like
Standard_DS2_v2
for an AKS node, which has a cache size of 86 GiB, and the default 100 GiB OS disk size is requested, AKS will use a managed OS disk instead of an ephemeral one, as the 100 GiB requirement exceeds the available cache.
Ephemeral OS Disks
Ephemeral OS disks are a performance-optimized option for AKS nodes that are well-suited for stateless workloads. They are created on the node's local VM cache or temporary SSD, offering significant performance benefits.
- Performance: Ephemeral OS disks deliver lower latency and improved read/write performance compared to managed disks. This can lead to faster node boot times and more responsive node re-imaging operations.
- Non-Persistent: Data on an ephemeral OS disk is not persisted. If a node is rebooted, re-imaged, or deallocated, all data on the ephemeral OS disk is lost. This makes them ideal for workloads that don't rely on persistent node-level storage.
- Size Limitation: The size of an ephemeral OS disk is directly constrained by the available cache size of the chosen VM SKU. For an ephemeral OS disk to be provisioned, the requested OS disk size must be less than or equal to the VM's cache size. If the requested size (e.g., the 100 GiB default) exceeds the VM's cache, AKS will automatically revert to using a managed OS disk.
- Example: A
Standard_DS2_v2
VM, while supporting ephemeral OS disks, only has 86 GiB of cache size. Therefore, attempting to use the default 100 GiB OS disk with this VM size would automatically result in a managed OS disk being provisioned, unless you explicitly specify an OS disk size of 86 GiB or less.
Customizing OS Disk Size
You have the flexibility to customize the OS disk size when deploying your AKS cluster or adding new node pools. This can be done through the Azure CLI, Azure Portal, or ARM templates. Specifying a smaller OS disk size, particularly for ephemeral disks, can help ensure your desired OS disk type is provisioned if it fits within the VM's cache.
For optimal performance and cost efficiency, understanding the interplay between your chosen VM SKU, its cache size, and the default or specified OS disk size is crucial.
OS Disk Type | Default Size | Key Characteristics | Use Case Considerations |
---|---|---|---|
Managed OS Disk | 100 GiB | Persistent, flexible size, general-purpose | Default choice, reliable, handles larger OS disk requirements |
Ephemeral OS Disk | VM Cache Size | High performance, non-persistent, VM cache dependent | Stateless workloads, faster re-imaging, cost-effective for suitable VMs |