Setting up persistent storage volumes for a Kubernetes deployment

Enable persistent volume storage for your deployment. This storage allows for assets that to be accessed and persisted.

Catalog and Inventory require a ReadWriteMany (RWX) persistent volume, while NiFi-app, Registry-app, and the database (PostgreSQL or DB2) require a ReadWriteOnce (RWO) persistent volume.

Procedure

  1. Create a persistent volume.
    • Use a commercial cloud offering such as Google FileStore or Microsoft Azure Files.
      For example, using Google FileStore:
      1. Create the FileStore instance using the instructions on the Google FileStore site.
      2. Consume the file shares within your Kubernetes environemtn, or review the following sample yaml configuration files.
        • For a PersistentVolume (PV)
          apiVersion: v1
          kind: PersistentVolume
          metadata:
            name: hcl-commerce-sample-readwritemany-pv
          spec: 
            capacity:
              storage: 5Gi
            accessModes:
            - ReadWriteMany
            mountOptions:
              - hard
              - nolock
            nfs: 
              path: /file-share 
              server: ip-address
        • For a PersistentVolumeClaim (PVC)
          apiVersion: v1 
          kind: PersistentVolumeClaim 
          metadata: 
            name: hcl-commerce-sample-readwritemany-claim
          spec:
            accessModes:
            - ReadWriteMany
            storageClassName: ""
            volumeName: hcl-commerce-sample-readwritemany-pv
            resources:
              requests:
                storage: 5Gi
    • Stand up a cloud agnostic solution, such as Rook Ceph.
      Note: Be aware of the following when implementing Rook Ceph:
      • Rook Ceph can either be installed either as a set of Kubernetes resources or by installation a Helm chart. See the Ceph documentation for more details. .
      • The Linux kernel of your PV machine must be built with the RBD module.
      • You must create or enable the shared file system (cephFileSystems) after the Ceph cluster has been provisioned, and then create a Kubernetes StorageClass backed by this file system.
      • You require at least three worker nodes for a production cluster.
  2. Set the PVC for your deployment.
    When you have set up the storage class that supports RWX persistent volumes, you can specify the storage class name in the following locations:
    • assetsPVC/storageClass for Assets PVC
    This configuration allows the RWX persistent volumes to be dynamically created during the Helm installation process, using the existing PVC templates provided in the Helm chart.
    For a manual setup, follow these steps:
    1. Manually create the Persistent Volumes (PVs) and Persistent Volume Claims (PVCs).
    2. Specify the manually created PVC names under:
      • assetsPVC/existingClaim for Assets

    For more information, see Required Helm Chart configuration for Commerce+.

Results

Your persistent storage volume is created, and your deployment has been configured to use it.