Set Up Node-Local Storage for dSSM¶
This section describes how to configure node-local storage for distributed Session State Management (dSSM) Pods by creating a Storage Class and a Persistent Volume (PV) for each node. It also explains how to enable persistence in the override file to ensure that database data is retained across pod restarts on the same node.
Create Storage Class and Persistent Volume¶
Follow the steps below to create the required Storage Class and Persistent Volume resources.
Create a local-storage.yaml file with the following content.
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: local-storage provisioner: kubernetes.io/no-provisioner volumeBindingMode: WaitForFirstConsumer
Apply the Storage Class.
oc apply -f local-storage.yaml
Create a local-pv.yaml file for each node where the dSSM database pod will be deployed.
Note: The data will be stored at the path specified in the local.pathfield of thePersistent Volume. Ensure that this directory exists on the node and has appropriate read/write permissions.apiVersion: v1 kind: PersistentVolume metadata: name: <your-node-name>-pv spec: capacity: storage: 1Gi accessModes: - ReadWriteOnce storageClassName: local-storage local: path: /mnt/disks/data-dir nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - <your-node-name>
Apply the Persistent Volume.
oc apply -f local-pv.yaml
Enable Persistence for dSSM Pods¶
Important:
When persistence is enabled, a
Persistent Volumemust be defined.Ensure that the
Storage ClassandPersistent Volumesare created and correctly bound to the target nodes, as shown in the Create Storage Class and Persistent Volume section.
Follow the steps below to enable persistence for dSSM Pods.
Update the dssm-values.yaml file with the following values.
db: persistent_storage: enable persistent_storage_gb: 1 accessMode: ReadWriteOnce storage_class_name: local-storage
Run the following command to install the dSSM Helm chart.
helm install f5-dssm tar/f5-dssm-<tag>.tgz -f <over-ride-values>.yaml
For Example:
helm install f5-dssm tar/f5-dssm-1.0.15-0.1.11.tgz -f dssm-values.yaml
Disable Persistence for dSSM Pods¶
Note: When persistence is disabled, Persistent Volume or Storage Class is not required for dSSM pods.
Follow the steps below to disable persistence for dSSM Pods.
In the dssm-values.yaml file, set persistent_storage to disable.
db: persistent_storage: disbale
Run the following command to install the dSSM Helm chart.
helm install f5-dssm tar/f5-dssm-<tag>.tgz -f <over-ride-values>.yaml
For Example:
helm install f5-dssm tar/f5-dssm-1.0.15-0.1.11.tgz -f dssm-values.yaml
This configuration disables the use of Persistent Volumes for dSSM pods. As a result, dSSM database data will not be retained across pod restarts.
Feedback
Provide feedback to improve this document by emailing spkdocs@f5.com.