|
| 1 | +// Module included in the following assembly: |
| 2 | +// |
| 3 | +// * virt/virtual_machines/advanced_vm_management/virt-configuring-pci-passthrough.adoc |
| 4 | +// |
| 5 | + |
| 6 | +:_content-type: PROCEDURE |
| 7 | +[id="virt-preventing-nvidia-operands-from-deploying-on-nodes_{context}"] |
| 8 | += Preventing NVIDIA GPU operands from deploying on nodes |
| 9 | + |
| 10 | +If you use the link:https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/openshift/contents.html[NVIDIA GPU Operator] in your cluster, you can apply the `nvidia.com/gpu.deploy.operands=false` label to nodes that you do not want to configure for GPU or vGPU operands. This label prevents the creation of the pods that configure GPU or vGPU operands and terminates the pods if they already exist. |
| 11 | + |
| 12 | +ifdef::openshift-enterprise[] |
| 13 | +:FeatureName: Using the NVIDIA GPU Operator with {VirtProductName} |
| 14 | +include::snippets/technology-preview.adoc[] |
| 15 | +endif::[] |
| 16 | + |
| 17 | +.Prerequisites |
| 18 | + |
| 19 | +* The OpenShift CLI (`oc`) is installed. |
| 20 | +
|
| 21 | +.Procedure |
| 22 | + |
| 23 | +* Label the node by running the following command: |
| 24 | ++ |
| 25 | +[source,terminal] |
| 26 | +---- |
| 27 | +$ oc label node <node_name> nvidia.com/gpu.deploy.operands=false <1> |
| 28 | +---- |
| 29 | +<1> Replace `<node_name>` with the name of a node where you do not want to install the NVIDIA GPU operands. |
| 30 | +
|
| 31 | +.Verification |
| 32 | + |
| 33 | +. Verify that the label was added to the node by running the following command: |
| 34 | ++ |
| 35 | +[source,terminal] |
| 36 | +---- |
| 37 | +$ oc describe node <node_name> |
| 38 | +---- |
| 39 | + |
| 40 | +. Optional: If GPU operands were previously deployed on the node, verify their removal. |
| 41 | + |
| 42 | +.. Check the status of the pods in the `nvidia-gpu-operator` namespace by running the following command: |
| 43 | ++ |
| 44 | +[source,terminal] |
| 45 | +---- |
| 46 | +$ oc get pods -n nvidia-gpu-operator |
| 47 | +---- |
| 48 | ++ |
| 49 | +.Example output |
| 50 | + |
| 51 | +[source,terminal] |
| 52 | +---- |
| 53 | +NAME READY STATUS RESTARTS AGE |
| 54 | +gpu-operator-59469b8c5c-hw9wj 1/1 Running 0 8d |
| 55 | +nvidia-sandbox-validator-7hx98 1/1 Running 0 8d |
| 56 | +nvidia-sandbox-validator-hdb7p 1/1 Running 0 8d |
| 57 | +nvidia-sandbox-validator-kxwj7 1/1 Terminating 0 9d |
| 58 | +nvidia-vfio-manager-7w9fs 1/1 Running 0 8d |
| 59 | +nvidia-vfio-manager-866pz 1/1 Running 0 8d |
| 60 | +nvidia-vfio-manager-zqtck 1/1 Terminating 0 9d |
| 61 | +---- |
| 62 | + |
| 63 | +.. Monitor the pod status until the pods with `Terminating` status are removed: |
| 64 | ++ |
| 65 | +[source,terminal] |
| 66 | +---- |
| 67 | +$ oc get pods -n nvidia-gpu-operator |
| 68 | +---- |
| 69 | ++ |
| 70 | +.Example output |
| 71 | + |
| 72 | +[source,terminal] |
| 73 | +---- |
| 74 | +NAME READY STATUS RESTARTS AGE |
| 75 | +gpu-operator-59469b8c5c-hw9wj 1/1 Running 0 8d |
| 76 | +nvidia-sandbox-validator-7hx98 1/1 Running 0 8d |
| 77 | +nvidia-sandbox-validator-hdb7p 1/1 Running 0 8d |
| 78 | +nvidia-vfio-manager-7w9fs 1/1 Running 0 8d |
| 79 | +nvidia-vfio-manager-866pz 1/1 Running 0 8d |
| 80 | +---- |
0 commit comments