Is it possible to create a volume that is shared between all pods in a deployment but impossible to mount for any other pod?
Alternatively that is read/write from one deployment and just read from any other pod?
Is it possible to create a volume that is shared between all pods in a deployment but impossible to mount for any other pod?
Alternatively that is read/write from one deployment and just read from any other pod?
That could be addressed in Kubernetes 1.12 (Q3 2018) with Topology aware dynamic provisioning, which is now in beta.
That means storage resources can now understand where they live.
This also includes beta support to AWS EBS and GCE PD.
See kubernetes/feature 561 and its doc PR 9939 (commit e1e6555)
See Storage / Storage Classes / Volume Binding Mode (beta in K8s 1.12)
Allowed Topologies is how to restrict the topology of provisioned volumes to specific zones.