All Products
Search
Document Center

Container Service for Kubernetes:Configure custom parameters for the binpack plug-in in ACK Lingjun clusters

Last Updated:Apr 01, 2024

You can enable bin packing during pod scheduling by selecting Preferably Use Bin Packing During Pod Scheduling and specifying the weight of the node score calculated by the binpack plug-in. A larger weight indicates a higher probability that pods are scheduled to the same node. You can also specify the resource names based on which the binpack plug-in calculates the node score and the weight of each resource in the node score calculation. A larger value indicates a greater influence on the node score. This topic describes how to configure custom parameters for the binpack plug-in in Container Service for Kubernetes (ACK) Lingjun clusters.

Prerequisites

An ACK Lingjun cluster that runs Kubernetes 1.20 or later is created. For more information, see Create an ACK Lingjun managed cluster.

Limits

Kubernetes version

kube-scheduler version

1.22

1.22.15-ack-2.0 and later

1.20

1.20.11-9.0-bcaa6001-aliyun and later

Procedure

  1. Log on to the ACK console. In the left-side navigation pane, click Clusters.

  2. On the Clusters page, click the name of the cluster that you want to manage and choose Operations > Add-ons in the left-side navigation pane.

  3. On the Core Components tab, find Kube Scheduler and click Configuration in the lower-right corner of the card.

  4. In the Kube Scheduler Parameters dialog box, configure the parameters based on your requirements and click OK.

    Parameter

    Description

    Type

    Valid value

    Default

    Preferably Use Bin Packing During Pod Scheduling (Pods Are Evenly Distributed among Nodes When Unselected)

    • Select the check box.

    • This parameter specifies whether to schedule pods based on the binpack algorithm.

    bool

    • false

    • true

    true

    binpackPluginWeight

    Note

    This parameter takes effect only if you select Preferably Use Bin Packing During Pod Scheduling (Pods Are Evenly Distributed among Nodes When Unselected).

    The weight of the node score calculated by the binpack plug-in.

    In most cases, you can use the default settings. If pods are not scheduled as expected after you enable bin packing, you can set the weight to a larger value, such as 200. For more information, see binpack weight.

    int

    [1,100000]

    100

    binpackResourceWeight

    Note

    This parameter takes effect only if you select Preferably Use Bin Packing During Pod Scheduling (Pods Are Evenly Distributed among Nodes When Unselected).

    The weight of each resource when the binpack plug-in calculates the node score. For more information, see Enabling bin packing using MostAllocated strategy.

    You can configure the following parameters in the scoringStrategy:resources section to specify the weight of each resource:

    • The name parameter corresponds to the resourceName parameter in the ACK console. Schema validation is performed on the resourceName parameter. The value of the resourceName parameter can contain only letters, digits, periods (.), forward slashes (/), and hyphens (-).

    • The weight parameter corresponds to the resourceWeight parameter in the ACK console. The value of the resourceWeight parameter must be an integer

    • resourceName: string

    • resourceWeight: int

    from 1 to 10000.

    • cpu:1

    • memory:1