-
Notifications
You must be signed in to change notification settings - Fork 1.9k
OSDOCS#12034: HCP Kubevirt topology spread constraint #93263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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`. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to also comment out the callout lines? The preview looks good though.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Added
#for call outs