3.2 KiB
Scheduler plugins for Kubernetes
scheduler-plugins is out-of-tree scheduler plugins based on the scheduler framework.
The kube-scheduler binary includes a list of plugins:
- CapacityScheduling [Beta]
- CoScheduling [Beta]
- NodeResources [Beta]
- NodeResouceTopology [Beta]
- PreemptionToleration [Alpha]
- Trimaran [Alpha]
- NetworkAware [Sample]
- CrossNodePreemption [Sample]
- PodState [Sample]
- QualityOfService [Sample]
Currently, we use helm chart to install the scheduler plugins, so that a second scheduler would be created and running. Note that running multi-scheduler will inevitably encounter resource conflicts when the cluster is short of resources.
Compatibility Matrix
There are requirements for the version of Kubernetes, please see Compatibility Matrix . It deserves our attention.
Scheduler Plugins | Compiled With K8s Version |
---|---|
v0.28.9 | v1.28.9 |
v0.27.8 | v1.27.8 |
Turning it on
The scheduler_plugins_enabled
option is used to enable the installation of scheduler plugins.
You can enable or disable some plugins by setting the scheduler_plugins_enabled_plugins
or scheduler_plugins_disabled_plugins
option. They must be in the list we mentioned above.
In addition, to use custom plugin configuration, set a value for scheduler_plugins_plugin_config
option.
For example, for Coscheduling plugin, you want to customize the permit waiting timeout to 10 seconds:
scheduler_plugins_plugin_config:
- name: Coscheduling
args:
permitWaitingTimeSeconds: 10 # default is 60
Leverage plugin
Once the plugin is installed, we can apply CRs into cluster. For example, if using CoScheduling
, we can apply the CR and test the deployment in the example.