This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.3.10.4. 配置 descheduler 策略
您可以配置 descheduler 使用什么策略来驱除 pod。
先决条件
- 必须具有集群管理员权限。
流程
编辑
KubeDescheduler
对象:oc edit kubedeschedulers.operator.openshift.io cluster -n openshift-kube-descheduler-operator
$ oc edit kubedeschedulers.operator.openshift.io cluster -n openshift-kube-descheduler-operator
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 在
spec.strategies
部分中指定一个或多个策略 。Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
LowNodeUtilization
策略提供额外的参数,如CPUThreshold
和MemoryThreshold
,您可以选择进行配置。- 2
RemoveDuplicates
策略提供了一个可选参数ExcludeOwnerKinds
。- 3
RemovePodsHavingTooManyRestarts
策略要求设置PodRestartThreshold
参数。它还提供可选的InudingInitContainers
参数。- 4
RemovePodsViolatingInterPodAntiAffinity
、RemovePodsViolatingNodeAffinity
和RemovePodsViolatingNodeTaints 策略
没有可以配置的额外参数。- 5
PodLifeTime
策略需要设置MaxPodLifeTimeSeconds
参数。
您可以启用多个策略,且指定策略的顺序并不重要。
- 保存文件以使改变生效。