mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
140 lines
4.5 KiB
Plaintext
140 lines
4.5 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * storage/persistent_storage/persistent-storage-local.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="local-storage-install_{context}"]
|
|
= Installing the Local Storage Operator
|
|
|
|
The Local Storage Operator is not installed in {product-title} by default. Use the following procedure to install and configure this Operator to enable local volumes in your cluster.
|
|
|
|
.Prerequisites
|
|
|
|
* Access to the {product-title} web console or command-line interface (CLI).
|
|
|
|
.Procedure
|
|
|
|
. Create the `openshift-local-storage` project:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc adm new-project openshift-local-storage
|
|
----
|
|
|
|
. Optional: Allow local storage creation on infrastructure nodes.
|
|
+
|
|
You might want to use the Local Storage Operator to create volumes on infrastructure nodes in support of components such as logging and monitoring.
|
|
+
|
|
You must adjust the default node selector so that the Local Storage Operator includes the infrastructure nodes, and not just worker nodes.
|
|
+
|
|
To block the Local Storage Operator from inheriting the cluster-wide default selector, enter the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc annotate namespace openshift-local-storage openshift.io/node-selector=''
|
|
----
|
|
|
|
. Optional: Allow local storage to run on the management pool of CPUs in single-node deployment.
|
|
+
|
|
Use the Local Storage Operator in single-node deployments and allow the use of CPUs that belong to the `management` pool. Perform this step on single-node installations that use management workload partitioning.
|
|
+
|
|
To allow Local Storage Operator to run on the management CPU pool, run following commands:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc annotate namespace openshift-local-storage workload.openshift.io/allowed='management'
|
|
----
|
|
|
|
.From the UI
|
|
|
|
To install the Local Storage Operator from the web console, follow these steps:
|
|
|
|
. Log in to the {product-title} web console.
|
|
|
|
. Navigate to *Ecosystem* -> *Software Catalog*.
|
|
|
|
. Type *Local Storage* into the filter box to locate the Local Storage Operator.
|
|
|
|
. Click *Install*.
|
|
|
|
. On the *Install Operator* page, select *A specific namespace on the cluster*. Select *openshift-local-storage* from the drop-down menu.
|
|
|
|
. Adjust the values for *Update Channel* and *Approval Strategy* to the values that you want.
|
|
|
|
. Click *Install*.
|
|
|
|
Once finished, the Local Storage Operator will be listed in the *Installed Operators* section of the web console.
|
|
|
|
.From the CLI
|
|
. Install the Local Storage Operator from the CLI.
|
|
|
|
.. Create an object YAML file to define an Operator group and subscription for the Local Storage Operator,
|
|
such as `openshift-local-storage.yaml`:
|
|
+
|
|
.Example openshift-local-storage.yaml
|
|
[source,yaml]
|
|
----
|
|
apiVersion: operators.coreos.com/v1
|
|
kind: OperatorGroup
|
|
metadata:
|
|
name: local-operator-group
|
|
namespace: openshift-local-storage
|
|
spec:
|
|
targetNamespaces:
|
|
- openshift-local-storage
|
|
---
|
|
apiVersion: operators.coreos.com/v1alpha1
|
|
kind: Subscription
|
|
metadata:
|
|
name: local-storage-operator
|
|
namespace: openshift-local-storage
|
|
spec:
|
|
channel: stable
|
|
installPlanApproval: Automatic <1>
|
|
name: local-storage-operator
|
|
source: redhat-operators
|
|
sourceNamespace: openshift-marketplace
|
|
----
|
|
<1> The user approval policy for an install plan.
|
|
|
|
. Create the Local Storage Operator object by entering the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc apply -f openshift-local-storage.yaml
|
|
----
|
|
+
|
|
At this point, the Operator Lifecycle Manager (OLM) is now aware of the Local Storage Operator. A ClusterServiceVersion (CSV) for the Operator should appear in the target namespace, and APIs provided by the Operator should be available for creation.
|
|
+
|
|
. Verify local storage installation by checking that all pods and the Local Storage Operator have been created:
|
|
|
|
.. Check that all the required pods have been created:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc -n openshift-local-storage get pods
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
NAME READY STATUS RESTARTS AGE
|
|
local-storage-operator-746bf599c9-vlt5t 1/1 Running 0 19m
|
|
----
|
|
|
|
.. Check the ClusterServiceVersion (CSV) YAML manifest to see that the Local Storage Operator is available in the `openshift-local-storage` project:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get csvs -n openshift-local-storage
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
NAME DISPLAY VERSION REPLACES PHASE
|
|
local-storage-operator.4.2.26-202003230335 Local Storage 4.2.26-202003230335 Succeeded
|
|
----
|
|
|
|
After all checks have passed, the Local Storage Operator is installed successfully.
|