Dedicating OCP nodes for specific workloads

You can use the kubectl taint command to dedicate OCP cluster nodes for specific workloads. You can dedicate GPU nodes for CML workloads, and NVME nodes for CDW workloads.

Run the following command to get a list of all of the cluster nodes:

kubectl get nodes

Run the following command to list information about a specific cluster node:

kubectl describe node <node_name>
In the returned output, look for the Taints field.

Dedicate a GPU node for CML workloads

  1. Run the following command to dedicate a GPU node for CML workloads:
    kubectl taint nodes <node_name> nvidia.com/gpu=true:NoSchedule

    No other workload pods will be allowed to run on the tainted node.

  2. Run the following command to confirm that the taint has been successfully applied:
    kubectl describe node <node_name>

    In the returned output, look for the Taints field.

  • To remove the taint, run the following command:
    kubectl taint nodes <node_name> nvidia.com/gpu=true:NoSchedule-
    This command returns:
    node/<node_name> untainted

Dedicate a SSD node for CDW workloads

  1. Run the following command to dedicate a GPU node for CDW workloads:
    kubectl taint nodes <node_name> ssd/nvme=true:NoSchedule

    No other workload pods will be allowed to run on the tainted node.

  2. Run the following command to confirm that the taint has been successfully applied:
    kubectl describe node <node_name>

    In the returned output, look for the Taints field.

  • To remove the taint, run the following command:
    kubectl taint nodes <node_name> ssd/nvme=true:NoSchedule-
    This command returns:
    node/<node_name> untainted

Additional Notes