mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
OSDOCS#12034: HCP Kubevirt topology spread constraint
This commit is contained in:
committed by
openshift-cherrypick-robot
parent
f516df7dd8
commit
e984ba0972
@@ -59,3 +59,10 @@ include::modules/hcp-virt-etcd-storage.adoc[leveloffset=+2]
|
||||
include::modules/hcp-virt-attach-nvidia-gpus.adoc[leveloffset=+1]
|
||||
|
||||
include::modules/hcp-virt-attach-nvidia-gpus-np-api.adoc[leveloffset=+1]
|
||||
|
||||
include::modules/hcp-topology-spread-constraint.adoc[leveloffset=+1]
|
||||
|
||||
[role="_additional-resources"]
|
||||
.Additional resources
|
||||
|
||||
* xref:../../nodes/scheduling/descheduler/nodes-descheduler-configuring.adoc#nodes-descheduler-installing_virt-enabling-descheduler-evictions[Installing the descheduler]
|
||||
|
||||
50
modules/hcp-topology-spread-constraint.adoc
Normal file
50
modules/hcp-topology-spread-constraint.adoc
Normal file
@@ -0,0 +1,50 @@
|
||||
// Module included in the following assemblies:
|
||||
//
|
||||
// * hosted_control_planes/hcp-manage/hcp-manage-virt.adoc
|
||||
|
||||
:_mod-docs-content-type: PROCEDURE
|
||||
[id="hcp-topology-spread-constraint_{context}"]
|
||||
= Spreading node pool VMs by using topologySpreadConstraint
|
||||
|
||||
By default, KubeVirt virtual machines (VMs) created by a node pool are scheduled on any available nodes that have the capacity to run the VMs. By default, the `topologySpreadConstraint` constraint is set to schedule VMs on multiple nodes.
|
||||
|
||||
In some scenarios, node pool VMs might run on the same node, which can cause availability issues. To avoid distribution of VMs on a single node, use the descheduler to continuously honor the `topologySpreadConstraint` constraint to spread VMs on multiple nodes.
|
||||
|
||||
.Prerequisites
|
||||
|
||||
* You installed the {descheduler-operator}. For more information, see "Installing the descheduler".
|
||||
|
||||
.Procedure
|
||||
|
||||
* 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.
|
||||
+
|
||||
The `KubeDescheduler` CR named `cluster` runs in the `openshift-kube-descheduler-operator` namespace.
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc edit kubedescheduler cluster -n openshift-kube-descheduler-operator
|
||||
----
|
||||
+
|
||||
.Example `KubeDescheduler` configuration
|
||||
[source,yaml]
|
||||
----
|
||||
apiVersion: operator.openshift.io/v1
|
||||
kind: KubeDescheduler
|
||||
metadata:
|
||||
name: cluster
|
||||
namespace: openshift-kube-descheduler-operator
|
||||
spec:
|
||||
mode: Automatic
|
||||
managementState: Managed
|
||||
deschedulingIntervalSeconds: 30 # <1>
|
||||
profiles:
|
||||
- SoftTopologyAndDuplicates # <2>
|
||||
- DevKubeVirtRelieveAndMigrate # <3>
|
||||
profileCustomizations:
|
||||
devDeviationThresholds: AsymmetricLow
|
||||
devActualUtilizationProfile: PrometheusCPUCombined
|
||||
# ...
|
||||
----
|
||||
<1> Sets the number of seconds between the descheduler running cycles.
|
||||
<2> This profile evicts pods that follow the soft topology constraint: `whenUnsatisfiable: ScheduleAnyway`.
|
||||
<3> This profile balances resource usage between nodes and enables the strategies, such as `RemovePodsHavingTooManyRestarts` and `LowNodeUtilization`.
|
||||
Reference in New Issue
Block a user