This folder holds the preemption toleration plugin implemented as discussed in Preemption Toleration.
- 💡 Sample (for demonstrating and inspiring purpose)
- 👶 Alpha (used in companies for pilot projects)
- 👦 Beta (used in companies and developed actively)
- 👨 Stable (used in companies for production workloads)
apiVersion: kubescheduler.config.k8s.io/v1
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: false
clientConnection:
kubeconfig: "REPLACE_ME_WITH_KUBE_CONFIG_PATH"
profiles:
- schedulerName: default-scheduler
plugins:
postFilter:
enabled:
- name: PreemptionToleration
disabled:
- name: DefaultPreemption
Preemption toleration policy can be defined on each PriorityClass
resource by annotations like below:
# PriorityClass with PreemptionToleration policy:
# Any pod P in this priority class can not be preempted (can tolerate preemption)
# - by preemptor pods with priority < 10000
# - and if P is within 1h since being scheduled
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: toleration-policy-sample
annotations:
preemption-toleration.scheduling.x-k8s.io/minimum-preemptable-priority: "10000"
preemption-toleration.scheduling.x-k8s.io/toleration-seconds: "3600"
value: 8000