- Newest
- Most votes
- Most comments
The issue you're experiencing with low allocatable EBS volumes on some of your EKS nodes is related to the maximum number of EBS volumes that can be attached to an EC2 instance.
In Amazon EKS, the CSINode resource shows how many volumes can still be attached to each node. The variation you're seeing (some nodes with only 2-12 volumes while others have 21-25) is likely due to:
- Different EC2 instance types being used in your node groups (different instance types support different maximum numbers of attachable EBS volumes)
- Some nodes already having EBS volumes attached (either by pods or by the system)
The nodes showing very low numbers (like 2 or 12) likely already have several EBS volumes attached, reducing their available capacity for new volume attachments.
To resolve this issue, you could:
- Check the instance types of the nodes with low allocatable volumes and consider using instance types that support more EBS volume attachments
- Scale up your node groups to add more nodes with available volume attachment capacity
- Redistribute your workloads to ensure pods requiring EBS volumes are scheduled on nodes with sufficient attachment capacity
- Consider using instance store volumes for temporary storage needs where appropriate to reduce EBS volume requirements
You might also want to check if there are any terminated pods that haven't properly released their volumes, which could be consuming attachment slots unnecessarily.
Sources
Not able to create private EKS cluster. cant user Internet gateway or natgateway | AWS re:Post
Amazon EMR cluster error: HDFS insufficient space error - Amazon EMR
answered a year ago
Hope you are having a wonderful day.
I’d be happy to help with your question here.
While EBS is one of the easiest ways for workloads to have persistent storage, it comes with scalability limitation. According to [1], “each instance type has maximum number of EBS volumes that can be attached.” You can find out specific Amazon EBS volume limits for each EC2 instance type in the link [2].
Because EBS CSI Driver can attach EBS volume only if the node instance has enough attachment slots, using small instance type, or using specific instance type (such as p2.16xlarge which are Xen-based instances and can host only 11 EBS volumes!) can lead to lower allocatable EBS volume count per node. Especially if you are managing nodes using Karpenter, which may provision a range of instance types as per needs of workloads, this could be one of the reasons why nodes have different allocatable EBS volume count.
However, there are several other factors that affect CSINode.Spec.Drivers[].Allocatable.Count value. According to [3], there are several other factors that may affect the property:
- Manual volume attachments: Attaching EBS volumes directly to instances outside of EKS
- Shared device limits: On older EC2 instance families, network interfaces and EBS volumes compete for the same attachment slots. See “Shared EBS Volume Limits” section in [2].
- Dynamic ENI scaling: The VPC CNI and Amazon Web Services (AWS) Load Balancer Controller attach network interfaces as workloads scale, consuming attachment slots on the instance.
Since CSINode.Spec.Drivers[].Allocatable.Count is initialized during plugin registration with kubelet on each node, if the node met any of the above factors before it CSI Driver plugin registration (i.e. EBS volume or network interface attached), then Allocatable.Count value could be smaller than the instance type’s maximum available EBS volume capacity.
My Recommended solutions are as follows:
- Starting from EKS 1.34+, EKS enables MutableCSINodeAllocatableCount feature gate, released as alpha in Kubernetes 1.33 and beta in 1.34, by default and will “keep allocatable count in sync with reality”[3]. This might help CSINode to have actual, live allocatable EBS volume count. Since your EKS version is 1.32, I would recommend upgrading EKS version to 1.34, or upgrade to 1.33 and enable the feature gate.
- Check if you are using instance types that has shared EBS volume limit. If yes, try switching to instance types that has dedicated EBS volume limit.
- Use Kubernetes taints to declare what instance types the workload should run on (preferrably those with higher allocatable EBS volume count) and limit the number of replicas on a single instance. [3]
Should you need any further assistance, or has additional question, please feel free to leave a comment and I would be happy to follow-up.
Thanks.
Resources:
[1]https://docs.aws.amazon.com/eks/latest/best-practices/scale-data-plane.html#_avoid_instances_with_low_ebs_attach_limits_if_workloads_use_ebs_volumes [2]https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/volume_limits.html [3]https://aws.amazon.com/ko/blogs/storage/improve-kubernetes-pod-scheduling-accuracy-using-amazon-ebs/
answered a year ago
Relevant content
asked 4 months ago
asked 4 years ago
- AWS OFFICIALUpdated 6 months ago
