-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41805 from sabrinajess/CNV12571
CNV-12571: New content to enable descheduler on VMs
- Loading branch information
Showing
5 changed files
with
124 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 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 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 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,46 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// virt/virtual_machines/advanced_vm_management/virt-enabling-descheduler-evictions.adoc | ||
|
||
:_content-type: PROCEDURE | ||
[id="virt-enabling-descheduler-evictions_{context}"] | ||
= Enabling descheduler evictions on a virtual machine (VM) | ||
|
||
After the descheduler is installed, you can enable descheduler evictions on your VM by adding an annotation to the `VirtualMachine` custom resource (CR). | ||
|
||
.Prerequisites | ||
|
||
* Install the descheduler in the {product-title} web console or OpenShift CLI (`oc`). | ||
* Ensure that the VM is not running. | ||
.Procedure | ||
|
||
. Before starting the VM, add the `descheduler.alpha.kubernetes.io/evict` annotation to the `VirtualMachine` CR: | ||
+ | ||
[source,yaml] | ||
---- | ||
apiVersion: kubevirt.io/v1 | ||
kind: VirtualMachine | ||
spec: | ||
template: | ||
metadata: | ||
annotations: | ||
descheduler.alpha.kubernetes.io/evict: "true" | ||
---- | ||
|
||
. If you did not already set the `DevPreviewLongLifecycle` profile in the web console during installation, specify the `DevPreviewLongLifecycle` in the `spec.profile` section of the `KubeDescheduler` object: | ||
+ | ||
[source,yaml] | ||
---- | ||
apiVersion: operator.openshift.io/v1 | ||
kind: KubeDescheduler | ||
metadata: | ||
name: cluster | ||
namespace: openshift-kube-descheduler-operator | ||
spec: | ||
deschedulingIntervalSeconds: 3600 | ||
profiles: | ||
- DevPreviewLongLifecycle | ||
---- | ||
|
||
The descheduler is now enabled on the VM. |
19 changes: 19 additions & 0 deletions
19
...irtual_machines/advanced_vm_management/virt-enabling-descheduler-evictions.adoc
This file contains 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,19 @@ | ||
:_content-type: ASSEMBLY | ||
[id="virt-enabling-descheduler-evictions"] | ||
= Enabling descheduler evictions on virtual machines | ||
include::modules/virt-document-attributes.adoc[] | ||
include::modules/common-attributes.adoc[] | ||
:context: virt-enabling-descheduler-evictions | ||
|
||
toc::[] | ||
|
||
:FeatureName: Descheduler eviction for virtual machines | ||
include::snippets/technology-preview.adoc[] | ||
|
||
The xref:../../../nodes/scheduling/nodes-descheduler.adoc#nodes-descheduler[descheduler] can be used to evict a running pod to allow the pod to be rescheduled onto a more suitable node. You must install the descheduler by using the {product-title} web console or OpenShift CLI (`oc`) before you can enable it on your virtual machine (VM). | ||
|
||
include::modules/nodes-descheduler-profiles.adoc[leveloffset=+1] | ||
|
||
include::modules/nodes-descheduler-installing.adoc[leveloffset=+1] | ||
|
||
include::modules/virt-enabling-descheduler-evictions.adoc[leveloffset=+1] |