This page describes the maximum number of volumes that can be attached to a Node for various cloud providers.
Cloud providers like Google, Amazon, and Microsoft typically have a limit on how many volumes can be attached to a Node. It is important for Kubernetes to respect those limits. Otherwise, Pods scheduled on a Node could get stuck waiting for volumes to attach.
The Kubernetes scheduler has default limits on the number of volumes that can be attached to a Node:
|Cloud service||Maximum volumes per Node|
|Amazon Elastic Block Store (EBS)||39|
|Google Persistent Disk||16|
|Microsoft Azure Disk Storage||16|
You can change these limits by setting the value of the
KUBE_MAX_PD_VOLS environment variable, and then starting the scheduler.
Use caution if you set a limit that is higher than the default limit. Consult the cloud provider’s documentation to make sure that Nodes can actually support the limit you set.
The limit applies to the entire cluster, so it affects all Nodes.
Kubernetes 1.11 introduced support for dynamic volume limits based on Node type as an Alpha feature. In Kubernetes 1.12 this feature is graduating to Beta and will be enabled by default.
Dynamic volume limits is supported for following volume types.
When the dynamic volume limits feature is enabled, Kubernetes automatically determines the Node type and enforces the appropriate number of attachable volumes for the node. For example:
For Amazon EBS disks on M5,C5,R5,T3 and Z1D instance types, Kubernetes allows only 25 volumes to be attached to a Node. For other instance types on Amazon Elastic Compute Cloud (EC2), Kubernetes allows 39 volumes to be attached to a Node.
On Azure, up to 64 disks can be attached to a node, depending on the node type. For more details, refer to Sizes for virtual machines in Azure.
For CSI, any driver that advertises volume attach limits via CSI specs will have those limits available as the Node’s allocatable property and the Scheduler will not schedule Pods with volumes on any Node that is already at its capacity. Refer to the CSI specs for more details.
Was this page helpful?
Thanks for the feedback. If you have a specific, answerable question about how to use Kubernetes, ask it on Stack Overflow. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.