@@ -19,8 +19,8 @@ order of Pods and out-of-resource eviction ordering on the Node.
1919
2020{% capture body %}
2121
22- ## How to use priority and preemption
23- To use priority and preemption in Kubernetes 1.8 and later, follow these steps:
22+ ## How to use priority
23+ To use priority in Kubernetes 1.8 and later, follow these steps:
2424
25251 . Enable the feature.
2626
@@ -32,9 +32,9 @@ Of course you do not need to create the Pods directly; normally you would add
3232
3333The following sections provide more information about these steps.
3434
35- ## Enabling priority and preemption
35+ ## Enabling priority
3636
37- Pod priority and preemption is disabled by default in Kubernetes 1.8.
37+ Pod priority is disabled by default in Kubernetes 1.8.
3838To enable the feature, set this command-line flag for the API server, scheduler and kubelet:
3939
4040```
@@ -51,6 +51,30 @@ Also enable scheduling.k8s.io/v1alpha1 API and Priority [admission controller](/
5151After the feature is enabled, you can create [ PriorityClasses] ( #priorityclass )
5252and create Pods with [ ` priorityClassName ` ] ( #pod-priority ) set.
5353
54+
55+ ## How to use preemption
56+
57+ Before Kubernetes 1.11, preemption is bound with ` PodPriority ` feature gate and will be automatically enabled with priority.
58+
59+ But in Kubernetes 1.11 and later, preemption is controlled by a kube-scheduler flag ` disablePreemption ` which is ` false ` by default.
60+ Please note, although preemption is enabled by default, it will be ignored if priority feature is disabled.
61+
62+ If you want to use priority without enabling preemption, you can set ` disablePreemption ` to ` true ` and enable ` PodPriority ` feature
63+ at the same time, here's a sample configuration:
64+
65+ ``` yaml
66+ apiVersion : componentconfig/v1alpha1
67+ kind : KubeSchedulerConfiguration
68+ algorithmSource :
69+ provider : DefaultProvider
70+
71+ ...
72+
73+ disablePreemption : true
74+
75+ ` ` `
76+
77+
5478If you try the feature and then decide to disable it, you must remove the PodPriority
5579command-line flag or set it to false, and then restart the API server and
5680scheduler. After the feature is disabled, the existing Pods keep their priority
0 commit comments