1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/cnf-creating-nrop-cr.adoc

99 lines
3.4 KiB
Plaintext

// Module included in the following assemblies:
//
// *scalability_and_performance/cnf-numa-aware-scheduling.adoc
:_module-type: PROCEDURE
[id="cnf-creating-nrop-cr_{context}"]
= Creating the NUMAResourcesOperator custom resource
When you have installed the NUMA Resources Operator, then create the `NUMAResourcesOperator` custom resource (CR) that instructs the NUMA Resources Operator to install all the cluster infrastructure needed to support the NUMA-aware scheduler, including daemon sets and APIs.
.Prerequisites
* Install the OpenShift CLI (`oc`).
* Log in as a user with `cluster-admin` privileges.
* Install the NUMA Resources Operator.
.Procedure
. Create the `NUMAResourcesOperator` custom resource:
.. Save the following minimal required YAML file example as `nrop.yaml`:
+
[source,yaml]
----
apiVersion: nodetopology.openshift.io/v1
kind: NUMAResourcesOperator
metadata:
name: numaresourcesoperator
spec:
nodeGroups:
- machineConfigPoolSelector:
matchLabels:
pools.operator.machineconfiguration.openshift.io/worker: "" <1>
----
+
<1> This must match the `MachineConfigPool` resource that you want to configure the NUMA Resources Operator on. For example, you might have created a `MachineConfigPool` resource named `worker-cnf` that designates a set of nodes expected to run telecommunications workloads. Each `NodeGroup` must match exactly one `MachineConfigPool`. Configurations where `NodeGroup` matches more than one `MachineConfigPool` are not supported.
.. Create the `NUMAResourcesOperator` CR by running the following command:
+
[source,terminal]
----
$ oc create -f nrop.yaml
----
. Optional: To enable NUMA-aware scheduling for multiple machine config pools (MCPs), define a separate `NodeGroup` for each pool. For example, define three `NodeGroups` for `worker-cnf`, `worker-ht`, and `worker-other`, in the `NUMAResourcesOperator` CR as shown in the following example:
+
.Example YAML definition for a `NUMAResourcesOperator` CR with multiple `NodeGroups`
[source,yaml]
----
apiVersion: nodetopology.openshift.io/v1
kind: NUMAResourcesOperator
metadata:
name: numaresourcesoperator
spec:
logLevel: Normal
nodeGroups:
- machineConfigPoolSelector:
matchLabels:
machineconfiguration.openshift.io/role: worker-ht
- machineConfigPoolSelector:
matchLabels:
machineconfiguration.openshift.io/role: worker-cnf
- machineConfigPoolSelector:
matchLabels:
machineconfiguration.openshift.io/role: worker-other
----
.Verification
. Verify that the NUMA Resources Operator deployed successfully by running the following command:
+
[source,terminal]
----
$ oc get numaresourcesoperators.nodetopology.openshift.io
----
+
.Example output
[source,terminal]
----
NAME AGE
numaresourcesoperator 27s
----
. After a few minutes, run the following command to verify that the required resources deployed successfully:
+
[source,terminal]
----
$ oc get all -n openshift-numaresources
----
+
.Example output
[source,terminal]
----
NAME READY STATUS RESTARTS AGE
pod/numaresources-controller-manager-7d9d84c58d-qk2mr 1/1 Running 0 12m
pod/numaresourcesoperator-worker-7d96r 2/2 Running 0 97s
pod/numaresourcesoperator-worker-crsht 2/2 Running 0 97s
pod/numaresourcesoperator-worker-jp9mw 2/2 Running 0 97s
----