mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
107 lines
2.3 KiB
Plaintext
107 lines
2.3 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="install-lvms-operator-cli_{context}"]
|
|
= Installing {lvms} by using the CLI
|
|
|
|
As a cluster administrator, you can install {lvms} by using the OpenShift CLI.
|
|
|
|
[NOTE]
|
|
====
|
|
The default namespace for the {lvms} Operator is `openshift-lvm-storage`.
|
|
====
|
|
|
|
.Prerequisites
|
|
|
|
* You have installed the OpenShift CLI (`oc`).
|
|
* You have logged in to {product-title} as a user with `cluster-admin` and Operator installation permissions.
|
|
|
|
.Procedure
|
|
|
|
. Create a YAML file with the configuration for creating a namespace:
|
|
+
|
|
.Example YAML configuration for creating a namespace
|
|
[source,yaml]
|
|
----
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
labels:
|
|
openshift.io/cluster-monitoring: "true"
|
|
pod-security.kubernetes.io/enforce: privileged
|
|
pod-security.kubernetes.io/audit: privileged
|
|
pod-security.kubernetes.io/warn: privileged
|
|
name: openshift-lvm-storage
|
|
----
|
|
|
|
. Create the namespace by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc create -f <file_name>
|
|
----
|
|
|
|
. Create an `OperatorGroup` CR YAML file:
|
|
+
|
|
.Example `OperatorGroup` CR
|
|
[source,yaml]
|
|
----
|
|
apiVersion: operators.coreos.com/v1
|
|
kind: OperatorGroup
|
|
metadata:
|
|
name: openshift-storage-operatorgroup
|
|
namespace: openshift-lvm-storage
|
|
spec:
|
|
targetNamespaces:
|
|
- openshift-storage
|
|
----
|
|
|
|
. Create the `OperatorGroup` CR by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc create -f <file_name>
|
|
----
|
|
|
|
. Create a `Subscription` CR YAML file:
|
|
+
|
|
.Example `Subscription` CR
|
|
[source,yaml]
|
|
----
|
|
apiVersion: operators.coreos.com/v1alpha1
|
|
kind: Subscription
|
|
metadata:
|
|
name: lvms
|
|
namespace: openshift-lvm-storage
|
|
spec:
|
|
installPlanApproval: Automatic
|
|
name: lvms-operator
|
|
source: redhat-operators
|
|
sourceNamespace: openshift-marketplace
|
|
----
|
|
|
|
. Create the `Subscription` CR by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc create -f <file_name>
|
|
----
|
|
|
|
.Verification
|
|
|
|
. To verify that {lvms} is installed, run the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get csv -n openshift-lvm-storage -o custom-columns=Name:.metadata.name,Phase:.status.phase
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
Name Phase
|
|
4.13.0-202301261535 Succeeded
|
|
----
|