Skip to content

Commit e19553a

Browse files
authored
Merge pull request #98815 from danielclowers/CNV-62399-420
CNV#62399: 4.20 Descheduler profile doc
2 parents 42a26f1 + 383d120 commit e19553a

File tree

5 files changed

+90
-67
lines changed

5 files changed

+90
-67
lines changed

modules/hcp-topology-spread-constraint.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ In some scenarios, node pool VMs might run on the same node, which can cause ava
1616
1717
.Procedure
1818

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.
2020
+
2121
The `KubeDescheduler` CR named `cluster` runs in the `openshift-kube-descheduler-operator` namespace.
2222
+
@@ -39,7 +39,7 @@ spec:
3939
deschedulingIntervalSeconds: 30 # <1>
4040
profiles:
4141
- SoftTopologyAndDuplicates # <2>
42-
- DevKubeVirtRelieveAndMigrate # <3>
42+
- KubeVirtRelieveAndMigrate # <3>
4343
profileCustomizations:
4444
devDeviationThresholds: AsymmetricLow
4545
devActualUtilizationProfile: PrometheusCPUCombined

modules/nodes-descheduler-profiles.adoc

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,17 @@ Do not enable `CompactAndScale` with any of the following profiles: `LifecycleAn
9090

9191
endif::nodes[]
9292
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.
9494

9595
[IMPORTANT]
9696
====
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.
9898
====
9999
endif::virt[]
100100

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.
108102

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:
110104

111105
--
112106
* **Resource utilization**: Increased resource pressure raises the overhead for running applications.
@@ -132,14 +126,14 @@ spec:
132126
deschedulingIntervalSeconds: 30
133127
mode: "Automatic"
134128
profiles:
135-
- DevKubeVirtRelieveAndMigrate
129+
- KubeVirtRelieveAndMigrate
136130
profileCustomizations:
137131
devEnableSoftTainter: true
138132
devDeviationThresholds: AsymmetricLow
139133
devActualUtilizationProfile: PrometheusCPUCombined
140134
----
141135

142-
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):
143137

144138
.Example `MachineConfig` CR
145139
[source,yaml]
@@ -155,6 +149,11 @@ spec:
155149
- psi=1
156150
----
157151

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+
158157
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.
159158

160159
// Show LongLifecycle profile both for virt and nodes
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
// Module included in the following assemblies:
2+
//
3+
// virt/virtual_machines/advanced_vm_management/virt-enabling-descheduler-evictions.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="virt-configuring-descheduler-evictions_{context}"]
7+
= 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.
62+
+
63+
[source,yaml]
64+
----
65+
apiVersion: kubevirt.io/v1
66+
kind: VirtualMachine
67+
spec:
68+
template:
69+
metadata:
70+
annotations:
71+
descheduler.alpha.kubernetes.io/prefer-no-eviction: "true"
72+
----
73+
74+
. Start the VM.
75+
76+
The VM is now configured according to the descheduler settings.

modules/virt-enabling-descheduler-evictions.adoc

Lines changed: 0 additions & 52 deletions
This file was deleted.

virt/managing_vms/advanced_vm_management/virt-enabling-descheduler-evictions.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ include::modules/nodes-descheduler-profiles.adoc[leveloffset=+1]
1414

1515
include::modules/nodes-descheduler-installing.adoc[leveloffset=+1]
1616

17-
include::modules/virt-enabling-descheduler-evictions.adoc[leveloffset=+1]
17+
include::modules/virt-configuring-descheduler-evictions.adoc[leveloffset=+1]
1818

1919
[role="_additional-resources"]
2020
[id="additional-resources_enabling-descheduler-evictions"]

0 commit comments

Comments
 (0)