Node-specific Volume Limits

Node-specific Volume Limits

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.

Kubernetes default limits

The Kubernetes scheduler has default limits on the number of volumes that can be attached to a Node:

Cloud serviceMaximum volumes per Node
Amazon Elastic Block Store (EBS)39
Google Persistent Disk16
Microsoft Azure Disk Storage16

Dynamic volume limits

FEATURE STATE: Kubernetes v1.17 [stable]

Dynamic volume limits are supported for following volume types.

  • Amazon EBS
  • Google Persistent Disk
  • Azure Disk
  • CSI

For volumes managed by in-tree volume plugins, Kubernetes automatically determines the Node type and enforces the appropriate maximum number of volumes for the node. For example:

  • On Google Compute Engine, up to 127 volumes can be attached to a node, depending on the node type.

  • 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.

  • If a CSI storage driver advertises a maximum number of volumes for a Node (using NodeGetInfo), the kube-scheduler honors that limit. Refer to the CSI specifications for details.

  • For volumes managed by in-tree plugins that have been migrated to a CSI driver, the maximum number of volumes will be the one reported by the CSI driver.

Mutable CSI Node Allocatable Count

FEATURE STATE: Kubernetes v1.36 [stable](enabled by default)

CSI drivers can dynamically adjust the maximum number of volumes that can be attached to a Node at runtime. This enhances scheduling accuracy and reduces pod scheduling failures due to changes in resource availability.

To use this feature, you must enable the MutableCSINodeAllocatableCount feature gate on the following components:

  • kube-apiserver
  • kubelet

Periodic Updates

When enabled, CSI drivers can request periodic updates to their volume limits by setting the nodeAllocatableUpdatePeriodSeconds field in the CSIDriver specification. For example:

apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
  name: hostpath.csi.k8s.io
spec:
  nodeAllocatableUpdatePeriodSeconds: 60

Kubelet will periodically call the corresponding CSI driver’s NodeGetInfo endpoint to refresh the maximum number of attachable volumes, using the interval specified in nodeAllocatableUpdatePeriodSeconds. The minimum allowed value for this field is 10 seconds.

If a volume attachment operation fails with a ResourceExhausted error (gRPC code 8), Kubernetes triggers an immediate update to the allocatable volume count for that Node. Additionally, kubelet marks affected pods as Failed, allowing their controllers to handle recreation. This prevents pods from getting stuck indefinitely in the ContainerCreating state.

Preventing Pod placement without CSI driver

FEATURE STATE: Kubernetes v1.37 [beta](enabled by default)

The VolumeLimitScaling feature gate is enabled by default in Kubernetes v1.37.

However, preventing pod placement on nodes without a CSI driver requires explicit opt-in via the spec.preventPodSchedulingIfMissing field of the CSIDriver object.

The preventPodSchedulingIfMissing field defaults to false and must be set to true if you do not want pods to be scheduled on nodes without a CSI driver. This decision to default to false was made for backward compatibility reasons and compatibility with Cluster AutoScaler which may not be aware of CSI volume limits during the autoscaling phase (see section below).

apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
  name: hostpath.csi.k8s.io
spec:
  preventPodSchedulingIfMissing: true

CSI volume attach limits and cluster autoscaler

Cluster autoscaler can account for CSI volume limits when --enable-csi-node-aware-scheduling=true. This option is independent of the VolumeLimitScaling feature gate.

If you use cluster autoscaler, only set spec.preventPodSchedulingIfMissing to true when cluster autoscaler is configured with --enable-csi-node-aware-scheduling=true. Otherwise, its scheduling simulations do not include the required CSINode information for new nodes, and cluster autoscaler might fail to scale up for pending Pods that use CSI volumes.

Last modified August 06, 2026 at 10:11 AM PST: Add links for Cluster Autoscaler (d525c3e375)