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-operatorCopy 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参数。
您可以启用多个策略,且指定策略的顺序并不重要。
- 保存文件以使改变生效。