The network plug-in determines the maximum number of pods that a worker node can support, a limit that typically cannot be changed. In Terway mode, the limit depends on the number of elastic network interfaces (ENIs) that the ECS instance provides. In Flannel mode, the limit is specified when you create a cluster and cannot be modified later. If you reach the pod limit, we recommend adding nodes to your node pool to increase the total number of available pods.
Maximum pods per node
Terway
Maximum container network pods per node
For more information, see Work with the Terway network plug-in.
|
Terway mode |
Pod limit |
Example |
Pods with static IP, separate vSwitch, and separate security group |
|
shared ENI mode |
(Number of ENIs supported by the ECS instance type - 1) × Number of private IP addresses per ENI. (EniQuantity - 1) × EniPrivateIpAddressQuantity Note
A node must support more than 11 pods to join the cluster. |
For example, ecs.g7.4xlarge supports 8 ENIs with 30 private IPs each. Maximum pods: (8 - 1) × 30 = 210. Important
The maximum number of pods that use node ENIs is fixed by the node's instance type. Modifying the |
0 |
|
shared ENI mode + Trunk ENI |
Maximum Trunk pods per node: Total network interfaces for the ECS instance type - Number of ENIs supported by the ECS instance type. EniTotalQuantity - EniQuantity |
||
|
exclusive ENI mode |
ECS instance: Number of ENIs supported by the ECS instance type - 1. EniQuantity - 1 Lingjun instance: Lingjun ENI quota - 1. LeniQuota - 1 Note
A node must support more than 6 pods to join the cluster. |
For example, ecs.g7.4xlarge supports 8 ENIs. Maximum pods: (8 - 1) = 7. |
Number of ENIs supported by the ECS instance type - 1. EniQuantity - 1 Note
Lingjun instances are not supported. |
Host network pods
The number of host network pods is 3 by default and cannot be modified. If you change this value, new pods may fail to receive an IP address. After a node restarts, the maximum number of pods per node is reset to the default value.
Flannel
In Flannel mode, the maximum number of pods per node (Number of Pods per Node) is specified when you create a cluster and cannot be modified later.
The valid values for Number of Pods per Node are 16, 32, 64, 128, and 256.
Increase available pods
The following sections describe how to increase the number of available pods based on your network plug-in. These solutions increase the total number of available pods in your cluster, not the per-node maximum.
Scale out the node pool (recommended)
Applies to: Terway and Flannel.
Instructions: Manually or automatically scale out a node pool to increase the number of available pods. For more information, see Manually scale a node pool and Node autoscaling.
Impact: This operation does not affect running workloads. However, an oversized cluster may compromise availability and performance. Therefore, carefully plan your use of large-scale clusters. For more information, see Suggestions on how to use large-scale clusters.
Upgrade instance types
Applies to: Terway
Instructions: Upgrade the instance type of worker nodes to increase the number of pods per node. For more information, see Upgrade or downgrade node resources. The maximum number of pods a node supports is not linearly related to its instance type; instead, it depends on the number of ENIs provided by the ECS instance family.
Impact: To apply an instance type upgrade, you must restart the ECS instance. This may cause temporary service interruptions. Before you upgrade the instance type, evaluate the workload impact to determine if you need to add redundant nodes to handle the workload. You must also drain the node that you want to upgrade and remove it from the ACK cluster. After you complete the upgrade during off-peak hours, add the node back to the cluster. For more information about instance type upgrades, including billing details and procedures, see Overview of instance configuration changes and Upgrade or downgrade node resources. For information about how to remove and add existing nodes, including related considerations, see Remove a node and Add existing nodes.
Recreate the cluster and replan pod CIDR
Applies to: Flannel
Instructions: Create a cluster and set the Number of Pods per Node parameter. The value of Number of Pods per Node is the maximum number of pods supported per node. For more information, see Work with Flannel.
Impact: This operation requires you to rebuild your services.
FAQ
Check max pods in Terway mode
-
Method 1: When you create a node pool, in the Instance Type section, check the Terway Mode (Supported Pods) column to find the maximum number of container network pods supported by an instance type.
-
Method 2: Manually calculate the number of pods supported by the instance type based on the following data:
-
Check the documentation for the number of elastic network interfaces supported by the instance type. For more information, see Instance families.
-
Use OpenAPI Explorer. Specify the
InstanceTypesof existing nodes and click Initiate Call. In the response,EniQuantityindicates the maximum number of ENIs that the instance type supports, andEniPrivateIpAddressQuantityis the number of private IPs per ENI.
-
View max pods for a node
To check the pod limit for existing nodes, follow these steps:
Log on to the ACK console. In the left navigation pane, click Clusters.
-
On the Clusters page, click the name of the target cluster and choose in the navigation pane on the left.
-
On the Nodes page, find the target node and check the Pods column. The column shows usage in an
Allocated/Totalformat, whereTotalis the maximum number of pods the node supports.
High pod usage after cluster creation
Cluster components run as pods and consume node resources. Some components may use multiple replicas. Enabling many features when you configure cluster components can create a significant number of pods on your nodes. We recommend that you follow the solutions to increase the number of available pods.
Manually modify the pod limit in Terway mode
No. In Terway mode, the number of pods that a node can host depends on the number of ENIs that the ECS instance type provides. Even if you manually increase the pod limit, newly created pods that exceed the actual limit will fail to schedule due to a lack of IP addresses. This can cause errors to be reported during cluster inspections and upgrade pre-checks.
If you have already manually modified the maximum number of pods for a node, we recommend that you remove the node and then add it back to the cluster. For more information about the procedure and related considerations, see Remove a node and Add existing nodes.
Different pod limits on nodes with same specs
A node's maximum pod count does not scale linearly with its CPU and memory. In Terway mode, this limit depends on the number of ENIs provided by the ECS instance family. In Flannel mode, the default maximum number of pods per node is 256, and some cluster types support higher limits.