// Module included in the following assemblies:
//
// * networking/hardware_networks/configuring-sriov-operator.adoc
// * hosted-control-planes/hcp-machine-config.adoc

:_mod-docs-content-type: PROCEDURE
[id="sriov-operator-hosted-control-planes_{context}"]
= Deploying the SR-IOV Operator for {hcp}

[role="_abstract"]
After you configure and deploy your hosting service cluster, you can create a subscription to the SR-IOV Operator on a hosted cluster. The SR-IOV pod runs on worker machines rather than the control plane.

.Prerequisites

You must configure and deploy the hosted cluster on AWS.

.Procedure

. Create a namespace and an Operator group:
+
[source,yaml]
----
apiVersion: v1
kind: Namespace
metadata:
  name: openshift-sriov-network-operator
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: sriov-network-operators
  namespace: openshift-sriov-network-operator
spec:
  targetNamespaces:
  - openshift-sriov-network-operator
----

. Create a subscription to the SR-IOV Operator:
+
[source,yaml]
----
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: sriov-network-operator-subsription
  namespace: openshift-sriov-network-operator
spec:
  channel: stable
  name: sriov-network-operator
  config:
    nodeSelector:
      node-role.kubernetes.io/worker: ""
  source: redhat-operators
  sourceNamespace: openshift-marketplace
----

.Verification

. To verify that the SR-IOV Operator is ready, run the following command and view the resulting output:
+
[source,terminal]
----
$ oc get csv -n openshift-sriov-network-operator
----
+
.Example output
[source,terminal,subs="attributes+"]
----
NAME                                         DISPLAY                   VERSION               REPLACES                                     PHASE
sriov-network-operator.{product-version}.0-202211021237   SR-IOV Network Operator   {product-version}.0-202211021237   sriov-network-operator.{product-version}.0-202210290517   Succeeded
----

. To verify that the SR-IOV pods are deployed, run the following command:
+
[source,terminal]
----
$ oc get pods -n openshift-sriov-network-operator
----