Persistent Volume Shift

Is it possible to use the same persistent NFS volume for multiple containers in openshift v3.1. because I noticed that when I mount the same persistent volumes into several containers, all the data inside the mounted container directory is replaced by the NFS server volume file. How to make sure that an NFS volume has data from multiple containers. And do containers only have their own data, and not all the data from PV?

early!

0
source share
2 answers

NFS persistent volumes will be the same across multiple containers. You can always use the pod name as an environment variable and each module sets up a unique subdirectory. But it is not possible to install the same NFS volume, and the root directory will not be identical.

0
source

@priyank - I think that if you want to limit data / directories on your shared storage, you can transfer additional groups from securityContext, and then set up ownership and groups on the NFS server, that is, dir1 open groups A and B and then dir1 / dirA is open only to podA and dir1 / dirB only to open podB - so that all containers have access to dir1, but then only podA has access to dirA, and podB has access to dirB. But what clayton said above applies to the share root directory

0
source

Source: https://habr.com/ru/post/1242877/


All Articles