persistent volume on openshift

1/27/2020

I am new to openshift ,I have deployed one application on openshift which uses persistent volume to store the files,and there is another application which pick that file and process it. Now my challenge is I am not able to understand how to use same persistent volume for two application, and how to pick the file from persistent volume is it mountPath where files get stored ?

-- Manisha Gawai
kubernetes
openshift

2 Answers

1/27/2020

You can address your requirement using one of the below option

  1. use the two containers in the same pod. that way both the containers can share the volume
  2. Use NFS or some other persistent storage that supports ReadWriteMany. That way multiple pods can share same volume
-- P Ekambaram
Source: StackOverflow

1/27/2020

To leverage shared storage for use by two separate containers (in two independent pods) configure PV of type NFS, or other shared storage such as GlusterFS etc.

A basic example using NFS available here Sharing an NFS Persistent Volume (PV) Across Two Pods

-- DT.
Source: StackOverflow