Persistent volumes and volume claims

A cluster administrator defines and creates a persistent volume (PV) to provide the cloud infrastructure with the details of the implementation of the storage. Use Container Storage Interface (CSI) drivers from platform-providers.

Security permissions for file systems are needed to secure the Kubernetes environment for the Cloud Pak and allow workloads to access storage. Access modes describe how the nodes access the storage. Cloud Pak for Business Automation uses ReadWriteOnce (RWO) and ReadWriteMany (RWX) depending on the persistent volume.

To use a PV or a pool of storage that is defined in a storage class, a persistent volume claim (PVC) is needed to consume the storage resources. A PVC is a claim for storage by a user that can include requests for a specific size and access modes.

  • If static volume provisioning is used, a cluster administrator must create PVs. The PVs describe the real storage, which is available for use by cluster users when they create a PVC to bind to a PV. For more information, see Static persistent volumes.
    The following example illustrates the YAML file contents to create a persistent volume claim. Use the example as a template for any PVC that you want to create statically.
    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      name: <PVCName>
      namespace: <NAMESPACE>
    spec:
      accessModes:
      - ReadWriteMany
      resources:
        requests:
          storage: <Size>
      volumeName: <PVName>
      volumeMode: Filesystem 
      storageClassName: <StorageClassName> 
  • Dynamic volume provisioning is a requirement of the Cloud Pak foundational services. Storage classes are needed to meet the "slow", "medium", and "fast" file storage and block storage for the Cloud Pak components. If you do not have three different file storage classes, you can use the same one for "slow", "medium", and "fast". The cluster is asked to dynamically provision a persistent volume specifically for the PVC when the PVC is created. For more information, see Dynamic persistent volumes.
    Note: When the Cloud Pak for Business Automation operator asks for the PVC to be created, the dynamically provisioned PV is automatically bound to the PVC.