Skip to content

Commit 1a6bd04

Browse files
resouerMisty Linville
authored and
Misty Linville
committed
Seperate priority and preemption (#8144)
1 parent 50bc79e commit 1a6bd04

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
@@ -59,6 +59,27 @@ scheduler. After the feature is disabled, the existing Pods keep their priority
5959
fields, but preemption is disabled, and priority fields are ignored, and you
6060
cannot set `priorityClassName` in new Pods.
6161

62+
## How to disable preemption
63+
64+
In Kubernetes 1.11 and later, preemption is controlled by a kube-scheduler flag `disablePreemption`, which is set to `false` by default.
65+
66+
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:
67+
68+
```yaml
69+
apiVersion: componentconfig/v1alpha1
70+
kind: KubeSchedulerConfiguration
71+
algorithmSource:
72+
provider: DefaultProvider
73+
74+
...
75+
76+
disablePreemption: true
77+
78+
```
79+
80+
Please note: although preemption of scheduler is enabled by default, preemption will not happen if `PodPriority` feature is not available.
81+
82+
6283
## PriorityClass
6384

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

0 commit comments

Comments
 (0)