From 610835108f8f193ac99a032f45ca649e82fec417 Mon Sep 17 00:00:00 2001 From: Jeremy Cowan Date: Fri, 28 May 2021 21:47:14 -0500 Subject: [PATCH] Update resource-bin-packing.md The original documentation was using `Profile` instead of the `KubeSchedulerConfiguration`. Also clarified how you pass this configuration to the scheduler. --- .../resource-bin-packing.md | 51 ++++++++++--------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/content/en/docs/concepts/scheduling-eviction/resource-bin-packing.md b/content/en/docs/concepts/scheduling-eviction/resource-bin-packing.md index a7b3639366..e294537c4b 100644 --- a/content/en/docs/concepts/scheduling-eviction/resource-bin-packing.md +++ b/content/en/docs/concepts/scheduling-eviction/resource-bin-packing.md @@ -26,40 +26,41 @@ each resource to score nodes based on the request to capacity ratio. This allows users to bin pack extended resources by using appropriate parameters and improves the utilization of scarce resources in large clusters. The behavior of the `RequestedToCapacityRatioResourceAllocation` priority function -can be controlled by a configuration option called -`requestedToCapacityRatioArguments`. This argument consists of two parameters -`shape` and `resources`. The `shape` parameter allows the user to tune the -function as least requested or most requested based on `utilization` and -`score` values. The `resources` parameter consists of `name` of the resource -to be considered during scoring and `weight` specify the weight of each -resource. +can be controlled by a configuration option called `RequestedToCapacityRatioArgs`. +This argument consists of two parameters `shape` and `resources`. The `shape` +parameter allows the user to tune the function as least requested or most +requested based on `utilization` and `score` values. The `resources` parameter +consists of `name` of the resource to be considered during scoring and `weight` +specify the weight of each resource. Below is an example configuration that sets `requestedToCapacityRatioArguments` to bin packing behavior for extended resources `intel.com/foo` and `intel.com/bar`. ```yaml -apiVersion: v1 -kind: Policy +apiVersion: kubescheduler.config.k8s.io/v1beta1 +kind: KubeSchedulerConfiguration +profiles: # ... -priorities: - # ... - - name: RequestedToCapacityRatioPriority - weight: 2 - argument: - requestedToCapacityRatioArguments: - shape: - - utilization: 0 - score: 0 - - utilization: 100 - score: 10 - resources: - - name: intel.com/foo - weight: 3 - - name: intel.com/bar - weight: 5 + pluginConfig: + - name: RequestedToCapacityRatio + args: + shape: + - utilization: 0 + score: 10 + - utilization: 100 + score: 0 + resources: + - name: intel.com/foo + weight: 3 + - name: intel.com/bar + weight: 5 ``` +Referencing the `KubeSchedulerConfiguration` file with the kube-scheduler +flag `--config=/path/to/config/file` will pass the configuration to the +scheduler. + **This feature is disabled by default** ### Tuning the Priority Function