Yes, this sharing, as you stated, is true, and you could say that it is at least very worrying if you want certain volumes to be for a specific purpose. This is useful if you have random volumes used, which is often not the case.
Scenario: Create an NFS volume for 1 database and a second volume for the second database. The database should be kept between reboots of module / full system reboots and should be installed again without any problems.
To solve this scenario (within the limits of Coubernes), there are several possible solutions:
Use the namespace as a solution to prevent cross-use of volumes, which can cause problems with the namespace because containers must talk through an external (or flat) network to interact with each other when crossing namespaces.
Another possible solution to this scenario is to create mount points using the mounted OS and use the then local volume. This will work, but requires an OS template maintenance that we tried to prevent the use of Kubernetes.
The third possible solution is to mount NFS from your container, thus completely avoiding the approach to persistent volumes, see How to connect an external nfs resource in Kubernetes? for this
source share