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

117 lines
3.1 KiB
Plaintext

//Module included in the following assemblies:
//
// * sandboxed_containers/deploying_sandboxed_containers.adoc
:_content-type: PROCEDURE
[id="sandboxed-containers-installing-operator-cli_{context}"]
= Installing the {sandboxed-containers-operator} using the CLI
You can install the {sandboxed-containers-operator} using the {product-title} CLI.
.Prerequisites
* You have {product-title} {product-version} installed on your cluster.
* You have installed the OpenShift CLI (`oc`).
* You have access to the cluster as a user with the `cluster-admin` role.
* You have subscribed to the {sandboxed-containers-first} catalog.
+
[NOTE]
====
Subscribing to the {sandboxed-containers-first} catalog provides `openshift-sandboxed-containers-operator` namespace access to the {sandboxed-containers-operator}.
====
.Procedure
. Create the `Namespace` object for the {sandboxed-containers-operator}.
.. Create a `Namespace` object YAML file that contains the following manifest:
+
[source,yaml]
----
apiVersion: v1
kind: Namespace
metadata:
name: openshift-sandboxed-containers-operator
----
.. Create the `Namespace` object:
+
[source,terminal]
----
$ oc create -f Namespace.yaml
----
. Create the `OperatorGroup` object for the {sandboxed-containers-operator}.
.. Create an `OperatorGroup` object YAML file that contains the following manifest:
+
[source,yaml]
----
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: openshift-sandboxed-containers-operator
namespace: openshift-sandboxed-containers-operator
spec:
targetNamespaces:
- openshift-sandboxed-containers-operator
----
.. Create the `OperatorGroup` object:
+
[source,terminal]
----
$ oc create -f OperatorGroup.yaml
----
. Create the `Subscription` object to subscribe the `Namespace` to the {sandboxed-containers-operator}.
.. Create a `Subscription` object YAML file that contains the following manifest:
+
[source,yaml,subs="attributes+"]
----
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: openshift-sandboxed-containers-operator
namespace: openshift-sandboxed-containers-operator
spec:
channel: "stable-{sandboxed-containers-version}"
installPlanApproval: Automatic
name: sandboxed-containers-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
startingCSV: sandboxed-containers-operator.v{sandboxed-containers-version-z}
----
.. Create the `Subscription` object:
+
[source,terminal]
----
$ oc create -f Subscription.yaml
----
The {sandboxed-containers-operator} is now installed on your cluster.
[NOTE]
====
All the object file names listed above are suggestions. You can create the object YAML files using other names.
====
.Verification
* Ensure that the Operator is correctly installed:
+
[source,terminal]
----
$ oc get csv -n openshift-sandboxed-containers-operator
----
+
.Example output
+
[source,terminal,subs="attributes+"]
----
NAME DISPLAY VERSION REPLACES PHASE
openshift-sandboxed-containers openshift-sandboxed-containers-operator {sandboxed-containers-version-z} {sandboxed-containers-legacy-version} Succeeded
----