1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/virt-example-vm-node-placement-tolerations.adoc
2025-11-18 16:29:25 +01:00

34 lines
903 B
Plaintext

// Module included in the following assemblies:
//
// * virt/virtual_machines/advanced_vm_management/virt-specifying-nodes-for-vms.adoc
:_mod-docs-content-type: REFERENCE
[id="virt-example-vm-node-placement-tolerations_{context}"]
= Example: VM node placement with tolerations
[role="_abstract"]
In this example, nodes that are reserved for virtual machines are already labeled with the `key=virtualization:NoSchedule` taint. Because this virtual machine has matching `tolerations`, it can schedule onto the tainted nodes.
[NOTE]
====
A virtual machine that tolerates a taint is not required to schedule onto a node with that taint.
====
.Example VM manifest
====
[source,yaml]
----
metadata:
name: example-vm-tolerations
apiVersion: kubevirt.io/v1
kind: VirtualMachine
spec:
tolerations:
- key: "key"
operator: "Equal"
value: "virtualization"
effect: "NoSchedule"
# ...
----
====