@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
source share