mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
34 lines
855 B
Plaintext
34 lines
855 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-node-selector_{context}"]
|
|
= Example: VM node placement with nodeSelector
|
|
|
|
[role="_abstract"]
|
|
In this example, the virtual machine requires a node that has metadata containing both `example-key-1 = example-value-1` and `example-key-2 = example-value-2` labels.
|
|
|
|
[WARNING]
|
|
====
|
|
If there are no nodes that fit this description, the virtual machine is not scheduled.
|
|
====
|
|
|
|
.Example VM manifest
|
|
====
|
|
[source,yaml]
|
|
----
|
|
metadata:
|
|
name: example-vm-node-selector
|
|
apiVersion: kubevirt.io/v1
|
|
kind: VirtualMachine
|
|
spec:
|
|
template:
|
|
spec:
|
|
nodeSelector:
|
|
example-key-1: example-value-1
|
|
example-key-2: example-value-2
|
|
# ...
|
|
----
|
|
====
|