$ cat << EOF| oc create -f -
apiVersion: v1
kind: Namespace
metadata:
name: openshift-sriov-network-operator
annotations:
workload.openshift.io/allowed: management
EOF
You can install the Single Root I/O Virtualization (SR-IOV) Network Operator on your cluster to manage SR-IOV network devices and network attachments.
As a cluster administrator, you can install the Single Root I/O Virtualization (SR-IOV) Network Operator by using the OKD CLI or the web console.
As a cluster administrator, you can install the Operator using the CLI.
A cluster installed on bare-metal hardware with nodes that have hardware that supports SR-IOV.
Install the OpenShift CLI (oc
).
An account with cluster-admin
privileges.
Create the openshift-sriov-network-operator
namespace by entering the following command:
$ cat << EOF| oc create -f -
apiVersion: v1
kind: Namespace
metadata:
name: openshift-sriov-network-operator
annotations:
workload.openshift.io/allowed: management
EOF
Create an OperatorGroup
custom resource (CR) by entering the following command:
$ cat << EOF| oc create -f -
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: sriov-network-operators
namespace: openshift-sriov-network-operator
spec:
targetNamespaces:
- openshift-sriov-network-operator
EOF
Create a Subscription
CR for the SR-IOV Network Operator by entering the following command:
$ cat << EOF| oc create -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: sriov-network-operator-subscription
namespace: openshift-sriov-network-operator
spec:
channel: stable
name: sriov-network-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
EOF
Create an SriovoperatorConfig
resource by entering the following command:
$ cat <<EOF | oc create -f -
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovOperatorConfig
metadata:
name: default
namespace: openshift-sriov-network-operator
spec:
enableInjector: true
enableOperatorWebhook: true
logLevel: 2
disableDrain: false
EOF
Check that the Operator is installed by entering the following command:
$ oc get csv -n openshift-sriov-network-operator \
-o custom-columns=Name:.metadata.name,Phase:.status.phase
Name Phase
sriov-network-operator.4.16.0-202406131906 Succeeded
As a cluster administrator, you can install the Operator using the web console.
A cluster installed on bare-metal hardware with nodes that have hardware that supports SR-IOV.
Install the OpenShift CLI (oc
).
An account with cluster-admin
privileges.
Install the SR-IOV Network Operator:
In the OKD web console, click Operators → OperatorHub.
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.
Verify that the SR-IOV Network Operator is installed successfully:
Navigate to the Operators → Installed Operators page.
Ensure that SR-IOV Network Operator is listed in the openshift-sriov-network-operator project with a Status of InstallSucceeded.
During 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 appear as installed, to troubleshoot further:
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-operator
project.
Check the namespace of the YAML file. If the annotation is missing, you can add the annotation workload.openshift.io/allowed=management
to the Operator namespace with the following command:
$ oc annotate ns/openshift-sriov-network-operator workload.openshift.io/allowed=management
For single-node OpenShift clusters, the annotation |