Chapter 2. Deploying OpenShift Container Storage on Google Cloud
Deploying OpenShift Container Storage on OpenShift Container Platform using dynamic storage devices provided by Google Cloud installer-provisioned infrastructure (IPI) enables you to create internal cluster resources. This results in internal provisioning of the base services, which helps to make additional storage classes available to applications.
Only internal Openshift Container Storage clusters are supported on Google Cloud. See Planning your deployment for more information about deployment requirements.
Ensure that you have addressed the requirements in Preparing to deploy OpenShift Container Storage chapter before proceeding with the below steps for deploying using dynamic storage devices:
2.1. Installing Red Hat OpenShift Container Storage Operator
You can install Red Hat OpenShift Container Storage Operator using the Red Hat OpenShift Container Platform Operator Hub.
- Access to an OpenShift Container Platform cluster using an account with cluster-admin and Operator installation permissions.
- You have at least three worker nodes in the RHOCP cluster.
- For additional resource requirements, see Planning your deployment.
When you need to override the cluster-wide default node selector for OpenShift Container Storage, you can use the following command in command line interface to specify a blank node selector for the
openshift-storagenamespace (create openshift-storage namespace in this case):
$ oc annotate namespace openshift-storage openshift.io/node-selector=
Taint a node as
infrato ensure only Red Hat OpenShift Container Storage resources are scheduled on that node. This helps you save on subscription costs. For more information, see How to use dedicated worker nodes for Red Hat OpenShift Container Storage chapter in Managing and Allocating Storage Resources guide.
- Navigate in the web console to the click Operators → OperatorHub.
- Scroll or type a keyword into the Filter by keyword box to search for OpenShift Container Storage Operator.
- Click Install on the OpenShift Container Storage operator page.
On the Install Operator page, the following required options are selected by default:
- Update Channel as stable-4.7.
- Installation Mode as A specific namespace on the cluster.
Installed Namespace as Operator recommended namespace openshift-storage. If Namespace
openshift-storagedoes not exist, it will be created during the operator installation.
- Select Approval Strategy as Automatic or Manual.
If you selected Automatic updates, then the Operator Lifecycle Manager (OLM) automatically upgrades the running instance of your Operator without any intervention.
If you selected Manual updates, then the OLM creates an update request. As a cluster administrator, you must then manually approve that update request to have the Operator updated to the new version.
Verify that the OpenShift Container Storage Operator shows a green tick indicating successful installation.
Create OpenShift Container Storage cluster.
For information, see Creating an OpenShift Container Storage Cluster Service in internal mode.
2.2. Creating an OpenShift Container Storage Cluster Service in internal mode
Use this procedure to create an OpenShift Container Storage Cluster Service after you install the OpenShift Container Storage operator.
- The OpenShift Container Storage operator must be installed from the Operator Hub. For more information, see Installing OpenShift Container Storage Operator using the Operator Hub.
Be aware that the default storage class of Google Cloud uses hard disk drive (HDD). To use solid state drive (SSD) based disks for better performance, you need to create a storage class, using
pd-ssdas shown in the following
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: faster provisioner: kubernetes.io/gce-pd parameters: type: pd-ssd volumeBindingMode: WaitForFirstConsumer reclaimPolicy: Delete
- Log into the OpenShift Web Console.
Click Operators → Installed Operators to view all the installed operators.
Ensure that the Project selected is
- Click OpenShift Container Storage > Create Instance link of Storage Cluster.
Select Mode is set to
In Select capacity and nodes,
Select Storage Class. By default, it is set to
standard. However, if you created a storage class to use SSD based disks for better performance, you need to select that storage class.
Select Requested Capacity from the drop down list. It is set to
2 TiBby default. You can use the drop down to modify the capacity value.Note
Once you select the initial storage capacity, cluster expansion is performed only using the selected usable capacity (3 times of raw storage).
In the Select Nodes section, select at least three available nodes.
For cloud platforms with multiple availability zones, ensure that the Nodes are spread across different Locations/availability zones.
If the nodes selected do not match the OpenShift Container Storage cluster requirement of an aggregated 30 CPUs and 72 GiB of RAM, a minimal cluster will be deployed. For minimum starting node requirements, see Resource requirements section in Planning guide.
- Click Next.
- Select Storage Class. By default, it is set to
(Optional) Security configuration
- Select the Enable encryption checkbox to encrypt block and file storage.
Choose any one or both Encryption level:
- Cluster-wide encryption to encrypt the entire cluster (block and file).
Storage class encryption to create encrypted persistent volume (block only) using encryption enabled storage class.Important
Storage class encryption is a Technology Preview feature available only for RBD PVs. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information, see Technology Preview Features Support Scope.
Select the Connect to an external key management service checkbox. This is optional for cluster-wide encryption.
Key Management Service Provider is set to
- Enter Vault Service Name, host Address of Vault server ('https://<hostname or ip>'), Port number and Token.
Expand Advanced Settings to enter additional settings and certificate details based on your Vault configuration:
- Enter the Key Value secret path in Backend Path that is dedicated and unique to OpenShift Container Storage.
- Enter TLS Server Name and Vault Enterprise Namespace.
- Provide CA Certificate, Client Certificate and Client Private Key by uploading the respective PEM encoded certificate file.
- Click Save.
- Key Management Service Provider is set to
- Click Next.
- Review the configuration details. To modify any configuration settings, click Back to go back to the previous configuration page.
- Click Create.
Edit the configmap if Vault Key/Value (KV) secret engine API, version 2 is used for cluster-wide encryption with Key Management System (KMS).
- On the OpenShift Web Console, navigate to Workloads → ConfigMaps.
- To view the KMS connection details, click ocs-kms-connection-details.
Edit the configmap.
- Click Action menu (⋮) → Edit ConfigMap.
kind: ConfigMap apiVersion: v1 metadata: name: ocs-kms-connection-details [...] data: KMS_PROVIDER: vault KMS_SERVICE_NAME: vault [...] VAULT_BACKEND: v2 [...]
- Click Save.
- On the storage cluster details page, the storage cluster name displays a green tick next to it to indicate that the cluster was created successfully.
Verify that the final Status of the installed storage cluster shows as
Phase: Readywith a green tick mark.
- Click Operators → Installed Operators → Storage Cluster link to view the storage cluster installation status.
- Alternatively, when you are on the Operator Details tab, you can click on the Storage Cluster tab to view the status.
- To verify that all components for OpenShift Container Storage are successfully installed, see Verifying your OpenShift Container Storage installation.