1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00
Files
openshift-docs/modules/virt-subscribing-cli.adoc

55 lines
1.5 KiB
Plaintext

// Module included in the following assemblies:
//
// * virt/install/installing-virt-cli.adoc
:_content-type: PROCEDURE
[id="virt-subscribing-cli_{context}"]
= Subscribing to the {VirtProductName} catalog by using the CLI
Before you install {VirtProductName}, you must subscribe to the {VirtProductName} catalog. Subscribing gives the `openshift-cnv` namespace access to the {VirtProductName} Operators.
To subscribe, configure `Namespace`, `OperatorGroup`, and `Subscription` objects by applying a single manifest to your cluster.
.Procedure
. Create a YAML file that contains the following manifest:
+
[source,yaml,subs="attributes+"]
----
apiVersion: v1
kind: Namespace
metadata:
name: openshift-cnv
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: kubevirt-hyperconverged-group
namespace: openshift-cnv
spec:
targetNamespaces:
- openshift-cnv
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: hco-operatorhub
namespace: openshift-cnv
spec:
source: redhat-operators
sourceNamespace: openshift-marketplace
name: kubevirt-hyperconverged
startingCSV: kubevirt-hyperconverged-operator.v{HCOVersion}
channel: "stable" <1>
----
<1> Using the `stable` channel ensures that you install the version of
{VirtProductName} that is compatible with your {product-title} version.
. Create the required `Namespace`, `OperatorGroup`, and `Subscription` objects
for {VirtProductName} by running the following command:
+
[source,terminal]
----
$ oc apply -f <file name>.yaml
----