Merge pull request #22429 from Huang-Wei/postfilter-doc

Document the changes of scheduler PostFilter extension point
This commit is contained in:
Kubernetes Prow Robot 2020-07-14 13:21:22 -07:00 committed by GitHub
commit 6ec8665bba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 51 deletions

View File

@ -51,40 +51,6 @@ Kubernetes already ships with two PriorityClasses:
These are common classes and are used to [ensure that critical components are always scheduled first](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/).
{{< /note >}}
## How to disable preemption
{{< caution >}}
Critical pods rely on scheduler preemption to be scheduled when a cluster
is under resource pressure. For this reason, it is not recommended to
disable preemption.
{{< /caution >}}
{{< note >}}
In Kubernetes 1.15 and later, if the feature `NonPreemptingPriority` is enabled,
PriorityClasses have the option to set `preemptionPolicy: Never`.
This will prevent pods of that PriorityClass from preempting other pods.
{{< /note >}}
Preemption is controlled by a kube-scheduler flag `disablePreemption`, which is
set to `false` by default.
If you want to disable preemption despite the above note, you can set
`disablePreemption` to `true`.
This option is available in component configs only and is not available in
old-style command line options. Below is a sample component config to disable
preemption:
```yaml
apiVersion: kubescheduler.config.k8s.io/v1alpha1
kind: KubeSchedulerConfiguration
algorithmSource:
provider: DefaultProvider
...
disablePreemption: true
```
## PriorityClass
A PriorityClass is a non-namespaced object that defines a mapping from a

View File

@ -75,6 +75,14 @@ node, the scheduler will call filter plugins in their configured order. If any
filter plugin marks the node as infeasible, the remaining plugins will not be
called for that node. Nodes may be evaluated concurrently.
### PostFilter {#post-filter}
These plugins are called after Filter phase, but only when no feasible nodes
were found for the node. Plugins are called in their configured order. If
any postFilter plugin marks the node as `Schedulable`, the remaining plugins
will not be called. A typical PostFilter implementation is preemption, which
tries to make the pod schedulable by preempting other Pods.
### PreScore {#pre-score}
These plugins are used to perform "pre-scoring" work, which generates a sharable

View File

@ -158,6 +158,8 @@ extension points:
Extension points: `QueueSort`.
- `DefaultBinder`: Provides the default binding mechanism.
Extension points: `Bind`.
- `DefaultPreemption`: Provides the default preemption mechanism.
Extension points: `PostFilter`.
You can also enable the following plugins, through the component config APIs,
that are not enabled by default:
@ -199,7 +201,7 @@ profiles:
- schedulerName: default-scheduler
- schedulerName: no-scoring-scheduler
plugins:
prescore:
preScore:
disabled:
- name: '*'
score:
@ -230,22 +232,6 @@ the same configuration parameters (if applicable). This is because the scheduler
only has one pending pods queue.
{{< /note >}}
## Upgrading from `v1alpha2` to `v1beta1` {#beta-changes}
When migrating from `kubescheduler.config.k8s.io/v1alpha2` to `kubescheduler.config.k8s.io/v1beta1`,
beware of the following changes, if applicable:
- `.bindTimeoutSeconds` was moved as part of plugin args for `VolumeBinding`,
which can be configured separately per [profile](#profiles).
- `.extenders` are updated to satisfy API standards. In particular:
- `.extenders` decoding is case sensitive. All fields are affected.
- `.extenders[*].httpTimeout` is of type `metav1.Duration`.
- `.extenders[*].enableHttps` is renamed to `.extenders[*].enableHTTPS`.
- `RequestedToCapacityRatio` args decoding is case sensitive. All fields are affected.
- `DefaultPodTopologySpread` [plugin](#scheduling-plugins) is renamed to `SelectorSpread`.
- `Unreserve` extension point is removed from Profile definition. All `Reserve`
plugins implement an `Unreserve` call.
## {{% heading "whatsnext" %}}
* Read the [kube-scheduler reference](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-scheduler/)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 59 KiB