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. That storage can be a number
of different types, including a Network File System (NFS) or a cloud-specific storage system.
Security permissions for file systems are needed to secure the Kubernetes environment for the container deployment and allow
workloads to access storage. Access modes describe how the nodes access the storage. FileNet® P8 uses
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
- Dynamic volume provisioning is based on Storage Classes. The PVC must
request a storage class and the cluster administrator must have created and configured that class
for dynamic provisioning to occur. For more information, see Dynamic persistent volumes and storage class.
The following example illustrates the YAML file contents to create a persistent volume claim using dynamic provisioning.
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: <PVCName> namespace: <NAMESPACE> spec: accessModes: - ReadWriteMany resources: requests: storage: <Size> volumeName: <PVName> volumeMode: Filesystem storageClassName: <StorageClassName>
Note: The operator can dynamically provision all required PVCs using a supplied storage class. When the PVC is requested, the dynamically provisioned PV is automatically bound to the PVC. Storage classes should meet the "slow", "medium", and "fast" file storage for the components. If you do not have three different file storage classes, you can use the same one for "slow", "medium", and "fast". - When a PV is no longer needed, you can delete the PVC objects that allow reclamation of the
resources that are used by the corresponding volume. The reclaim policy for a PV tells the cluster
what to do after claim for that PV is released. Valid values for the reclaim policy are
Delete
andRetain
. You need to useRetain
for PVs that hold data.