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.

Installing SR-IOV Network Operator

As a cluster administrator, you can install the SR-IOV Network Operator using the OpenShift Container Platform CLI or the web console.

Installing the Operator using the CLI

As a cluster administrator, you can install the Operator using the CLI.

Prerequisites
  • A cluster installed on bare-metal hardware with nodes that have hardware that supports SR-IOV.

  • The OpenShift Container Platform Command-line Interface (CLI), commonly known as oc.

  • Log in as a user with cluster-admin privileges.

Procedure
  1. Create a namespace for the SR-IOV Network Operator by completing the following actions:

    1. Create the following Namespace Custom Resource (CR) that defines the openshift-sriov-network-operator namespace, and then save the YAML in the sriov-namespace.yaml file:

      apiVersion: v1
      kind: Namespace
      metadata:
        name: openshift-sriov-network-operator
        labels:
          openshift.io/run-level: "1"
    2. Create the namespace by running the following command:

      $ oc create -f sriov-namespace.yaml
  2. Install the SR-IOV Network Operator in the namespace you created in the previous step by creating the following objects:

    1. Create the following OperatorGroup CR and save the YAML in the sriov-operatorgroup.yaml file:

      apiVersion: operators.coreos.com/v1
      kind: OperatorGroup
      metadata:
        name: sriov-network-operators
        namespace: openshift-sriov-network-operator
      spec:
        targetNamespaces:
        - openshift-sriov-network-operator
    2. Create the OperatorGroup CR by running the following command:

      $ oc create -f sriov-operatorgroup.yaml
    3. Run the following command to get the channel value required for the next step.

      $ oc get packagemanifest sriov-network-operator -n openshift-marketplace -o jsonpath='{.status.channels[].name}'
      
      alpha
    4. Create the following Subscription CR and save the YAML in the sriov-sub.yaml file:

      Example Subscription
      apiVersion: operators.coreos.com/v1alpha1
      kind: Subscription
      metadata:
        name: sriov-network-operator-subsription
        namespace: openshift-sriov-network-operator
      spec:
        channel: <channel> (1)
        name: sriov-network-operator
        source: redhat-operators (2)
        sourceNamespace: openshift-marketplace
      1 Specify the value from you obtained in the previous step for the .status.channels[].name parameter.
      2 You must specify the redhat-operators value.
    5. Create the Subscription object by running the following command:

      $ oc create -f sriov-sub.yaml
    6. Change to the openshift-sriov-network-operator project:

      $ oc project openshift-sriov-network-operator
      
      Now using project "openshift-sriov-network-operator"

Installing the Operator using the web console

As a cluster administrator, you can install the Operator using the web console.

You have to create the Namespace CR and OperatorGroup CR as mentioned in the previous section.

Procedure
  1. Install the SR-IOV Network Operator using the OpenShift Container Platform web console:

    1. In the OpenShift Container Platform web console, click OperatorsOperatorHub.

    2. Choose SR-IOV Network Operator from the list of available Operators, and then click Install.

    3. On the Create Operator Subscription page, under A specific namespace on the cluster select openshift-sriov-network-operator. Then, click Subscribe.

  2. Optional: Verify that the SR-IOV Network Operator installed successfully:

    1. Switch to the OperatorsInstalled Operators page.

    2. 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:

      • Go to the OperatorsInstalled Operators page and inspect the Operator Subscriptions and Install Plans tabs for any failure or errors under Status.

      • Go to the WorkloadsPods page and check the logs for Pods in the openshift-sriov-network-operator project.