Configuring the provider cluster for external client access
Configure the provider cluster to expose storage services and generate an onboarding token for client access.
Procedure
- Install the MetalLB operator. To install the MetalLB operator, complete the following steps:
- Log in to the Red Hat® OpenShift® Container Platform web console.
- Go to the Ecosystem > Software Catalog page.
- Scroll or type MetalLB into the Filter by keyword box.
- Select MetalLB Operator from the results.
- Click Install.
- On the Install Operator page, complete the following
configuration:
- Select stable from the Update channel list.
- Select the required version from the Version list.
- For Installation mode, select All namespaces on the cluster (default).
- For Installed Namespace, select Operator recommended Namespace.
- For Update approval, select either Automatic (recommended) or Manual.
- Click Install.
- Go to the Installed Operators page and confirm that:
- The MetalLB Operator appears in the list
- Status is Succeeded
- Create a MetalLB instance.
Apply the following configuration:
apiVersion: metallb.io/v1beta1 kind: MetalLB metadata: name: metallb namespace: metallb-system - Configure an IP address pool.
Define a range of IP addresses to be assigned by MetalLB:
apiVersion: metallb.io/v1beta1 kind: IPAddressPool metadata: name: metallb namespace: metallb-system spec: addresses: - 10.0.0.138-10.0.0.142 - Create an L2 advertisement.
Apply the following configuration:
apiVersion: metallb.io/v1beta1 kind: L2Advertisement metadata: name: l2advertisement namespace: metallb-system spec: ipAddressPools: - metallb - Create a LoadBalancer service.
Expose the provider API using a LoadBalancer:
apiVersion: v1 kind: Service metadata: name: ocs-provider-server-load-balancer namespace: openshift-storage annotations: metallb.universe.tf/ip-allocated-from-pool: metallb spec: type: LoadBalancer selector: app: ocsProviderApiServer ports: - name: provider protocol: TCP port: 50051 targetPort: ocs-provider nodePort: 30756Important:Record the LoadBalancer IP address and port. For example:
storageProviderEndpoint: 10.0.0.138:50051. You need this information when onboarding the client cluster. - Create a storage consumer instance. To create a storage consumer instance, complete the following steps:
- On the Red Hat OpenShift Container Platform web console, navigate to the Storage > Data Foundation > Storage Consumers page.
- Click Create Storage Consumer.
- Provide the required details, such as name and quota.
- Click Create.
- Generate the onboarding token. To generate the onboarding token of the created storage consumer instance, complete the following steps:
- Click the overflow menu ︙ icon for the new storage consumer instance.
- Select Generate client onboarding token.
- Copy the onboarding token for use on the client cluster.
Results
The provider cluster is configured, and the onboarding token and LoadBalancer endpoint are available for onboarding the client cluster.