<p>I have created a cluster on OpenShift Online for experimental use. My Deployment which I am trying to create needs to have a pre-populated data volume before use. All of the deployments should use the same volume and that means that the Persistent Volume Claim needs to be configured as ReadOnlyMany.</p>
<p>I have created a Persistent Volume Claim as well, but I am not sure is it possible to pre-populate a ReadOnlyMany volume on OpenShift?</p>

s3nti3ntB
<blockquote>
<p>I have created a Persistent Volume Claim as well, but I am not sure is it possible to pre-populate a ReadOnlyMany volume on OpenShift?</p>
</blockquote>
<p>Not really that's what <code>ReadOnlyMany</code> is, it's Read Only. You can use something else to pre-populate your volume prior (like a VM/Host/Container, or even another Kubernetes cluster if you remove the volume after pre-populating and <code>Retain</code> it). It probably won't work with the same Kubernetes cluster though unless the volume allows you to change from something else (<code>ReadWriteOnce</code>, <code>ReadWriteMany</code>) to <code>ReadOnlyMany</code>.</p>
<p>You didn't specify what type of <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes" rel="nofollow noreferrer">Volume</a> you are using but you could potentially use <code>ReadWriteMany</code> and manage access to write using plain <a href="https://www.tutorialspoint.com/unix/unix-file-permission.htm" rel="nofollow noreferrer">*nix filesystem permissions</a>. Then you can run your pods as a specific user using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/" rel="nofollow noreferrer"><code>SecurityContext</code></a>.</p>
<p>✌️</p>
