April 2018
Intermediate to advanced
468 pages
14h 34m
English
The scheduler algorithm is provided as part of the configuration. Custom schedulers can implement the ScheduleAlgorithm interface:
type ScheduleAlgorithm interface {
Schedule(*v1.Pod, NodeLister) (selectedMachine string, err error)
Preempt(*v1.Pod, NodeLister, error) (selectedNode *v1.Node,
preemptedPods []*v1.Pod,
cleanupNominatedPods []*v1.Pod,
err error)
Predicates() map[string]FitPredicate
Prioritizers() []PriorityConfig
}
When you run the scheduler, you can provide the name of the custom scheduler or a custom algorithm provider as a command-line argument. If none are provided, the default algorithm provider will be used. The command-line arguments to the scheduler are --algorithm-provider and --scheduler-name ...
Read now
Unlock full access