Kubernetes Scheduling, Preemption and Eviction Concepts: Difference between revisions
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
=External= | =External= | ||
* https://kubernetes.io/docs/concepts/scheduling-eviction/ | * https://kubernetes.io/docs/concepts/scheduling-eviction/ | ||
* Default scheduler implementation: https://github.com/kubernetes/kubernetes/tree/master/pkg/scheduler | |||
=Internal= | =Internal= | ||
* [[Kubernetes_Pod_and_Container_Concepts#Scheduling.2C_Preemption_and_Eviction|Pod and Container Concepts]] | * [[Kubernetes_Pod_and_Container_Concepts#Scheduling.2C_Preemption_and_Eviction|Pod and Container Concepts]] | ||
Line 21: | Line 23: | ||
{{External|https://kubernetes.io/docs/reference/scheduling/config/}} | {{External|https://kubernetes.io/docs/reference/scheduling/config/}} | ||
The behavior of <code>Kube-scheduler</code> can be customized by writing a configuration file and passing its path as a command line argument. | The behavior of <code>Kube-scheduler</code> can be customized by writing a configuration file and passing its path as a command line argument. | ||
==Multiple Schedulers== | |||
{{External|https://kubernetes.io/docs/tasks/extend-kubernetes/configure-multiple-schedulers/}} |
Latest revision as of 00:23, 7 December 2023
External
- https://kubernetes.io/docs/concepts/scheduling-eviction/
- Default scheduler implementation: https://github.com/kubernetes/kubernetes/tree/master/pkg/scheduler
Internal
Overview
Scheduling
Scheduling is the process that results in pods being matched with nodes that can run them.
Preemption
Preemption is the process of terminating pods with lower priority so that pods with higher priority can schedule on nodes.
Eviction
Eviction is the process of terminating on or more pods on nodes.
Kubernetes Scheduler
The scheduler is a system service whose job is to distribute pods to nodes for execution. An individual pod can be scheduled on one node and one node only, and the target node is chosen by the scheduler as result of the evaluation of a set of predicates that include affinity and anti-affinity rules, taints and tolerations, resource availability, etc., followed by ranking according to criteria such as whether the node has the image or not, how many pods are already running, etc. The highest ranking node is chosen to run the pod. If the scheduler cannot find a suitable node, the pod goes into a "Pending" state.
Scheduler Configuration
The behavior of Kube-scheduler
can be customized by writing a configuration file and passing its path as a command line argument.