Sample storage class and volume for HCL Digital Experience 9.5 containers
Learn how to set storage class and volume using a sample storage class and volume scripts for HCL Digital Experience 9.5 CF171 and higher container releases deployed to Amazon Elastic Container Service (EKS) or Red Hat OpenShift environment.
It is recommended to set a separate storage class and volume for production, especially if you have more than one project in the Kubernetes (Amazon EKS or Red Hat OpenShift) environment. This is a good practice because it prevents projects from overlapping storage volumes.
See video: Understanding the Core Persistent Volumes in HCL Digital Experience Container Update CF194
Follow these steps to create a new persistent volume and storage class, in either Amazon EKS or OpenShift.
- Use and save the following as your storage class file:
kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: dx-deploy-stg provisioner: kubernetes.io/no-provisioner reclaimPolicy: Retain volumeBindingMode: WaitForFirstConsumer
- Use and save the following as your storage volume file:
kind: PersistentVolume apiVersion: v1 metadata: name: wp-profile-volume spec: capacity: storage: 100Gi nfs: server: your_nfs_server.com path: /exports/volume_name accessModes: - ReadWriteMany persistentVolumeReclaimPolicy: Retain storageClassName: dx-deploy-stg mountOptions: - hard - nfsvers=4.1 - rsize=8388608 - wsize=8388608 - timeo=600 - retrans=2 - noresvport volumeMode: Filesystem
- Copy both files to your local file system.
- Change at least the server and path in your sample volume .yaml file to an appropriate NFS server and volume.
- To create the storage class, run the following command:
kubectl apply -f subclass.yaml
- To create the storage volume, run the following command:
kubectl apply -f SampleZVolume.yaml
- Continue with deployment.
nfs:
server: your_nfs_server.com
path: /exports/volume_name