From b8f36367612bec4b4d4d613f984d82f3ffa26163 Mon Sep 17 00:00:00 2001 From: Harry Zhang Date: Mon, 23 Apr 2018 14:52:27 -0700 Subject: [PATCH] Seperate priority and preemption --- .../configuration/pod-priority-preemption.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/concepts/configuration/pod-priority-preemption.md b/docs/concepts/configuration/pod-priority-preemption.md index dc482b11e1681..80f1d8a6ca262 100644 --- a/docs/concepts/configuration/pod-priority-preemption.md +++ b/docs/concepts/configuration/pod-priority-preemption.md @@ -57,6 +57,27 @@ scheduler. After the feature is disabled, the existing Pods keep their priority fields, but preemption is disabled, and priority fields are ignored, and you cannot set `priorityClassName` in new Pods. + +## How to disable preemption + +In Kubernetes 1.11 and later, preemption is controlled by a kube-scheduler flag `disablePreemption`, which is set to `false` by default. + +If you want to disable preemption, just set `disablePreemption` to `true`, here's a sample configuration: + +```yaml +apiVersion: componentconfig/v1alpha1 +kind: KubeSchedulerConfiguration +algorithmSource: + provider: DefaultProvider + +... + +disablePreemption: true + +``` + +Please note: although preemption of scheduler is enabled by default, preemption will not happen if `PodPriority` feature is not available. + ## PriorityClass A PriorityClass is a non-namespaced object that defines a mapping from a priority