Skip to content

Commit ade29b7

Browse files
authored
Merge pull request #28161 from jicowan/patch-1
Update resource-bin-packing.md
2 parents 04ea603 + 6108351 commit ade29b7

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

content/en/docs/concepts/scheduling-eviction/resource-bin-packing.md

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,39 +26,40 @@ each resource to score nodes based on the request to capacity ratio. This
2626
allows users to bin pack extended resources by using appropriate parameters
2727
and improves the utilization of scarce resources in large clusters. The
2828
behavior of the `RequestedToCapacityRatioResourceAllocation` priority function
29-
can be controlled by a configuration option called
30-
`requestedToCapacityRatioArguments`. This argument consists of two parameters
31-
`shape` and `resources`. The `shape` parameter allows the user to tune the
32-
function as least requested or most requested based on `utilization` and
33-
`score` values. The `resources` parameter consists of `name` of the resource
34-
to be considered during scoring and `weight` specify the weight of each
35-
resource.
29+
can be controlled by a configuration option called `RequestedToCapacityRatioArgs`.
30+
This argument consists of two parameters `shape` and `resources`. The `shape`
31+
parameter allows the user to tune the function as least requested or most
32+
requested based on `utilization` and `score` values. The `resources` parameter
33+
consists of `name` of the resource to be considered during scoring and `weight`
34+
specify the weight of each resource.
3635

3736
Below is an example configuration that sets
3837
`requestedToCapacityRatioArguments` to bin packing behavior for extended
3938
resources `intel.com/foo` and `intel.com/bar`.
4039

4140
```yaml
42-
apiVersion: v1
43-
kind: Policy
41+
apiVersion: kubescheduler.config.k8s.io/v1beta1
42+
kind: KubeSchedulerConfiguration
43+
profiles:
4444
# ...
45-
priorities:
46-
# ...
47-
- name: RequestedToCapacityRatioPriority
48-
weight: 2
49-
argument:
50-
requestedToCapacityRatioArguments:
51-
shape:
52-
- utilization: 0
53-
score: 0
54-
- utilization: 100
55-
score: 10
56-
resources:
57-
- name: intel.com/foo
58-
weight: 3
59-
- name: intel.com/bar
60-
weight: 5
61-
```
45+
pluginConfig:
46+
- name: RequestedToCapacityRatio
47+
args:
48+
shape:
49+
- utilization: 0
50+
score: 10
51+
- utilization: 100
52+
score: 0
53+
resources:
54+
- name: intel.com/foo
55+
weight: 3
56+
- name: intel.com/bar
57+
weight: 5
58+
```
59+
60+
Referencing the `KubeSchedulerConfiguration` file with the kube-scheduler
61+
flag `--config=/path/to/config/file` will pass the configuration to the
62+
scheduler.
6263

6364
**This feature is disabled by default**
6465

0 commit comments

Comments
 (0)