The binpack plug-in scores nodes based on resource utilization and schedules Pods to the highest-scoring node first. A higher score increases the probability that subsequent Pods land on the same node, consolidating workloads and reducing idle nodes. This is well-suited for GPU inference clusters and other workloads that benefit from high resource utilization. If your priority is fault tolerance, leave bin packing disabled so Pods spread evenly across nodes instead.
Prerequisites
Before you begin, ensure that you have:
-
An ACK Lingjun cluster running Kubernetes 1.20 or later. For more information, see Create an ACK Lingjun cluster.
-
A scheduler version that supports custom binpack parameters:
ACK Lingjun cluster version Minimum scheduler version 1.22 v1.22.15-ack-2.0 1.20 v1.20.11-9.0-bcaa6001-aliyun
Configure binpack parameters
-
Log on to the ACK console. In the left navigation pane, click Clusters.
-
On the Clusters page, click the name of the cluster you want to manage. In the left navigation pane, click Add-ons.
-
On the Core Components tab, find Kube Scheduler and click Configuration in the lower-right corner of the card.
-
In the Kube Scheduler Parameters dialog box, configure the parameters described in the following table, then click OK.
Parameter Description Type Valid values Default Preferably Use Bin Packing During Pod Scheduling (Pods Are Evenly Distributed among Nodes When Unselected) Schedules Pods using the binpack algorithm. When unselected, Pods spread evenly across nodes. bool true/falsetruebinpackPluginWeight Weight of the node score calculated by the binpack plug-in. A higher weight increases the influence of binpack scores on scheduling decisions. In most cases, you can use the default settings. If bin packing is enabled but Pods are not consolidating as expected, increase this value (for example, to 200). For details, see binpack weight. Takes effect only when Preferably Use Bin Packing During Pod Scheduling is selected.int 1–100000 100binpackResourceWeight Weight of each resource type when the binpack plug-in calculates the node score. Resources with a higher weight have more influence on which node is selected. Maps to scoringStrategy:resourcesin the Kubernetes scheduler configuration. Takes effect only when Preferably Use Bin Packing During Pod Scheduling is selected.resourceName: string;resourceWeight: intresourceWeight: 1–10000cpu:1,memory:1For
binpackResourceWeight, each entry has two fields that map to the KubernetesscoringStrategy:resourcesarray:-
resourceName(console) →namein YAML. Accepts letters, digits, periods (.), forward slashes (/), and hyphens (-). -
resourceWeight(console) →weightin YAML. Must be a positive integer.
For more information on resource scoring strategies, see Enabling bin packing using MostAllocated strategy.
-