9.18.11. Enabling descheduler evictions on virtual machines
You can use the descheduler to evict pods so that the pods can be rescheduled onto more appropriate nodes. If the pod is a virtual machine, the pod eviction causes the virtual machine to be live migrated to another node.
9.18.11.1. Descheduler profiles 링크 복사링크가 클립보드에 복사되었습니다!
Use descheduler profiles to enable specific eviction strategies that rebalance your cluster based on criteria such as pod lifecycle or node utilization.
Use the KubeVirtRelieveAndMigrate profile to enable the descheduler on a virtual machine.
KubeVirtRelieveAndMigrateThe
KubeVirtRelieveAndMigrateprofile evicts pods from high-cost nodes to reduce overall resource expenses and enable workload migration. It also periodically rebalances workloads to help maintain similar spare capacity across nodes, which supports better handling of sudden workload spikes. Nodes can experience the following costs:- Resource utilization: Increased resource pressure raises the overhead for running applications.
- Node maintenance: A higher number of containers on a node increases resource consumption and maintenance costs.
The profile enables the
LowNodeUtilizationstrategy with theEvictionsInBackgroundalpha feature. The profile also exposes the following customization fields:-
devActualUtilizationProfile: Enables load-aware descheduling. -
devLowNodeUtilizationThresholds: Sets experimental thresholds for theLowNodeUtilizationstrategy. Do not use this field withdevDeviationThresholds. -
devDeviationThresholds: Treats nodes with below-average resource usage as underutilized to help redistribute workloads from overutilized nodes. Do not use this field withdevLowNodeUtilizationThresholds. Supported values are:Low(10%:10%),Medium(20%:20%),High(30%:30%),AsymmetricLow(0%:10%),AsymmetricMedium(0%:20%),AsymmetricHigh(0%:30%). -
devEnableSoftTainter: Enables the soft-tainting component to dynamically apply or remove soft taints as scheduling hints.
Example configuration:
apiVersion: operator.openshift.io/v1 kind: KubeDescheduler metadata: name: cluster namespace: openshift-kube-descheduler-operator spec: managementState: Managed deschedulingIntervalSeconds: 30 mode: "Automatic" profiles: - KubeVirtRelieveAndMigrate profileCustomizations: devEnableSoftTainter: true devDeviationThresholds: AsymmetricLow devActualUtilizationProfile: PrometheusCPUCombinedThe
KubeVirtRelieveAndMigrateprofile requires PSI metrics to be enabled on all worker nodes. You can enable this by applying the followingMachineConfigcustom resource (CR):Example
MachineConfigCR:apiVersion: machineconfiguration.openshift.io/v1 kind: MachineConfig metadata: labels: machineconfiguration.openshift.io/role: worker name: 99-openshift-machineconfig-worker-psi-karg spec: kernelArguments: - psi=1참고The name of the
MachineConfigobject is significant because machine configs are processed in lexicographical order. By default, a config that starts with98-disables PSI. To ensure that PSI is enabled, name your config with a higher prefix, such as99-openshift-machineconfig-worker-psi-karg.You can use this profile with the
SoftTopologyAndDuplicatesprofile to also rebalance pods based on soft topology constraints, which can be useful in hosted control plane environments.