Skip to content

Commit 256f87e

Browse files
resouerk82cn
authored andcommitted
Seperate priority and preemption (kubernetes#8144)
1 parent 7d0bce5 commit 256f87e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

content/en/docs/concepts/configuration/pod-priority-preemption.md

+21
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,27 @@ scheduler. After the feature is disabled, the existing Pods keep their priority
5858
fields, but preemption is disabled, and priority fields are ignored, and you
5959
cannot set `priorityClassName` in new Pods.
6060

61+
## How to disable preemption
62+
63+
In Kubernetes 1.11 and later, preemption is controlled by a kube-scheduler flag `disablePreemption`, which is set to `false` by default.
64+
65+
If you want to disable preemption, just set `disablePreemption` to true. This will keep pod priority enabled while preemption is disabled. Here is a sample configuration:
66+
67+
```yaml
68+
apiVersion: componentconfig/v1alpha1
69+
kind: KubeSchedulerConfiguration
70+
algorithmSource:
71+
provider: DefaultProvider
72+
73+
...
74+
75+
disablePreemption: true
76+
77+
```
78+
79+
Please note: although preemption of scheduler is enabled by default, preemption will not happen if `PodPriority` feature is not available.
80+
81+
6182
## PriorityClass
6283

6384
A PriorityClass is a non-namespaced object that defines a mapping from a priority

0 commit comments

Comments
 (0)