You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/hcp-topology-spread-constraint.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ In some scenarios, node pool VMs might run on the same node, which can cause ava
16
16
17
17
.Procedure
18
18
19
-
* Open the `KubeDescheduler` custom resource (CR) by entering the following command, and then modify the `KubeDescheduler` CR to use the `SoftTopologyAndDuplicates` and `DevKubeVirtRelieveAndMigrate` profiles so that you maintain the `topologySpreadConstraint` constraint settings.
19
+
* Open the `KubeDescheduler` custom resource (CR) by entering the following command, and then modify the `KubeDescheduler` CR to use the `SoftTopologyAndDuplicates` and `KubeVirtRelieveAndMigrate` profiles so that you maintain the `topologySpreadConstraint` constraint settings.
20
20
+
21
21
The `KubeDescheduler` CR named `cluster` runs in the `openshift-kube-descheduler-operator` namespace.
Copy file name to clipboardExpand all lines: modules/nodes-descheduler-profiles.adoc
+11-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,23 +90,17 @@ Do not enable `CompactAndScale` with any of the following profiles: `LifecycleAn
90
90
91
91
endif::nodes[]
92
92
ifdef::virt[]
93
-
Use the `DevKubeVirtRelieveAndMigrate` or `LongLifecycle` profile to enable the descheduler on a virtual machine.
93
+
Use the `KubeVirtRelieveAndMigrate` or `LongLifecycle` profile to enable the descheduler on a virtual machine.
94
94
95
95
[IMPORTANT]
96
96
====
97
-
You can not have both `DevKubeVirtRelieveAndMigrate` and `LongLifeCycle` enabled at the same time.
97
+
You cannot have both `KubeVirtRelieveAndMigrate` and `LongLifeCycle` enabled at the same time.
98
98
====
99
99
endif::virt[]
100
100
101
-
`DevKubeVirtRelieveAndMigrate`:: This profile is an enhanced version of the `LongLifeCycle` profile.
102
-
+
103
-
--
104
-
:FeatureName: The `DevKubeVirtRelieveAndMigrate` profile
105
-
include::snippets/technology-preview.adoc[]
106
-
:!FeatureName:
107
-
--
101
+
`KubeVirtRelieveAndMigrate`:: This profile is an enhanced version of the `LongLifeCycle` profile.
108
102
109
-
The `DevKubeVirtRelieveAndMigrate` profile 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:
103
+
The `KubeVirtRelieveAndMigrate` profile 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:
110
104
111
105
--
112
106
* **Resource utilization**: Increased resource pressure raises the overhead for running applications.
The `DevKubeVirtRelieveAndMigrate` profile requires PSI metrics to be enabled on all worker nodes. You can enable this by applying the following `MachineConfig` custom resource (CR):
136
+
The `KubeVirtRelieveAndMigrate` profile requires PSI metrics to be enabled on all worker nodes. You can enable this by applying the following `MachineConfig` custom resource (CR):
143
137
144
138
.Example `MachineConfig` CR
145
139
[source,yaml]
@@ -155,6 +149,11 @@ spec:
155
149
- psi=1
156
150
----
157
151
152
+
[NOTE]
153
+
====
154
+
The name of the `MachineConfig` object is significant because machine configs are processed in lexicographical order. By default, a config that starts with `98-` disables PSI. To ensure that PSI is enabled, name your config with a higher prefix, such as `99-openshift-machineconfig-worker-psi-karg`.
155
+
====
156
+
158
157
You can use this profile with the `SoftTopologyAndDuplicates` profile to also rebalance pods based on soft topology constraints, which can be useful in hosted control plane environments.
159
158
160
159
// Show LongLifecycle profile both for virt and nodes
= Configuring descheduler evictions for virtual machines
8
+
9
+
After the descheduler is installed and configured, all migratable virtual machines (VMs) are eligible for eviction by default. You can configure the descheduler to manage VM evictions across the cluster and optionally exclude specific VMs from eviction.
10
+
11
+
.Prerequisites
12
+
13
+
* Install the descheduler in the {product-title} web console or OpenShift CLI (`oc`).
14
+
15
+
.Procedure
16
+
17
+
. Stop the VM.
18
+
19
+
. Configure the `KubeDescheduler` object with the `KubeVirtRelieveAndMigrate` profile and enable background evictions for improved VM eviction stability during live migration:
20
+
+
21
+
[source,yaml]
22
+
----
23
+
apiVersion: operator.openshift.io/v1
24
+
kind: KubeDescheduler
25
+
metadata:
26
+
name: cluster
27
+
namespace: openshift-kube-descheduler-operator
28
+
spec:
29
+
deschedulingIntervalSeconds: 60
30
+
profiles:
31
+
- KubeVirtRelieveAndMigrate
32
+
mode: Automatic
33
+
----
34
+
+
35
+
. Optional: To evict pods, set the `mode` field value to `Automatic`. By default, the descheduler does not evict pods.
36
+
37
+
. Optional: Configure limits for the number of parallel evictions to improve stability in large clusters.
38
+
+
39
+
The descheduler can limit the number of concurrent evictions per node and across the cluster by using the `evictionLimits` field. Set these limits to match the migration limits configured in the `HyperConverged` custom resource (CR).
40
+
+
41
+
[source,yaml]
42
+
----
43
+
spec:
44
+
evictionLimits:
45
+
node: 2
46
+
total: 5
47
+
----
48
+
+
49
+
Set values that correspond to the migration limits in the `HyperConverged` CR:
50
+
+
51
+
[source,yaml]
52
+
----
53
+
spec:
54
+
liveMigrationConfig:
55
+
parallelMigrationsPerCluster: 5
56
+
parallelOutboundMigrationsPerNode: 2
57
+
----
58
+
59
+
. Optional: To exclude the VM from eviction, add the `descheduler.alpha.kubernetes.io/prefer-no-eviction` annotation to the `spec.template.metadata.annotations` field. The change is applied dynamically and is propagated to the `VirtualMachineInstance` (VMI) object and the `virt-launcher` pod.
60
+
+
61
+
Only the presence of the annotation is checked. The value is not evaluated, so `"true"` and `"false"` have the same effect.
0 commit comments