Installing the SR-IOV Network Operator
To manage SR-IOV network devices and network attachments on your cluster, install the Single Root I/O Virtualization (SR-IOV) Network Operator. By using this Operator, you can centralize the configuration and lifecycle management of your SR-IOV resources.
As a cluster administrator, you can install the Single Root I/O Virtualization (SR-IOV) Network Operator by using the OpenShift Container Platform CLI or the web console.
Use the CLI to install the SR-IOV Network Operator
You can use the CLI to install the SR-IOV Network Operator. By using the CLI, you can deploy the Operator directly from your terminal to manage SR-IOV network devices and attachments without navigating the web console.
Prerequisites
- You installed the OpenShift CLI (
oc). - You have an account with
cluster-adminprivileges. - You installed a cluster on bare-metal hardware, and you ensured that cluster nodes have hardware that supports SR-IOV.
Procedure
- Create the
openshift-sriov-network-operatornamespace by entering the following command:$ cat << EOF| oc create -f -apiVersion: v1kind: Namespacemetadata:name: openshift-sriov-network-operatorannotations:workload.openshift.io/allowed: managementEOF - Create an
OperatorGroupcustom resource (CR) by entering the following command:$ cat << EOF| oc create -f -apiVersion: operators.coreos.com/v1kind: OperatorGroupmetadata:name: sriov-network-operatorsnamespace: openshift-sriov-network-operatorspec:targetNamespaces:- openshift-sriov-network-operatorEOF - Create a
SubscriptionCR for the SR-IOV Network Operator by entering the following command:$ cat << EOF| oc create -f -apiVersion: operators.coreos.com/v1alpha1kind: Subscriptionmetadata:name: sriov-network-operator-subscriptionnamespace: openshift-sriov-network-operatorspec:channel: stablename: sriov-network-operatorsource: redhat-operatorssourceNamespace: openshift-marketplaceEOF - Create an
SriovoperatorConfigresource by entering the following command:$ cat <<EOF | oc create -f -apiVersion: sriovnetwork.openshift.io/v1kind: SriovOperatorConfigmetadata:name: defaultnamespace: openshift-sriov-network-operatorspec:enableInjector: trueenableOperatorWebhook: truelogLevel: 2disableDrain: falseEOF
Verification
- To verify that the Operator is installed, enter the following command and then check that the output shows
Succeededfor the Operator:$ oc get csv -n openshift-sriov-network-operator \-o custom-columns=Name:.metadata.name,Phase:.status.phase
Use the web console to install the SR-IOV Network Operator
You can use the web console to install the SR-IOV Network Operator. By using the web console, you can deploy the Operator and manage SR-IOV network devices and attachments directly from a graphical interface without having to use the CLI.
Prerequisites
- You have an account with
cluster-adminprivileges. - You installed a cluster on bare-metal hardware, and you ensured that cluster nodes have hardware that supports SR-IOV.
Procedure
- Install the SR-IOV Network Operator:
- In the OpenShift Container Platform web console, click Ecosystem → Software Catalog.
- Select SR-IOV Network Operator from the list of available Operators, and then click Install.
- On the Install Operator page, under Installed Namespace, select Operator recommended Namespace.
- Click Install.
Verification
-
Navigate to the Ecosystem → Installed Operators page.
-
Ensure that SR-IOV Network Operator is listed in the openshift-sriov-network-operator project with a Status of InstallSucceeded.
noteDuring installation an Operator might display a Failed status. If the installation later succeeds with an InstallSucceeded message, you can ignore the Failed message.
-
If the Operator does not show as installed, complete any of the following steps to troubleshoot the issue:
-
Inspect the Operator Subscriptions and Install Plans tabs for any failure or errors under Status.
-
Navigate to the Workloads → Pods page and check the logs for pods in the
openshift-sriov-network-operatorproject. -
Check the namespace of the YAML file. If the annotation is missing, you can add the annotation
workload.openshift.io/allowed=managementto the Operator namespace with the following command:$ oc annotate ns/openshift-sriov-network-operator workload.openshift.io/allowed=managementnoteFor single-node OpenShift clusters, the annotation
workload.openshift.io/allowed=managementis required for the namespace.
-