linuxkuberneteslinux-containersmount-pointlinux-namespaces

Does containers in a Kubernetes Pod run in different "mount" namespaces?


Does containers in a Kubernetes Pod run in different "mount" namespaces? As per what i read in few online resources , when a container is launched , each container points to an isolated file system and the only thing that can be used to share file directories across containers is Kubernetes volumes. Hence, just wanted to understand, if they refer to different file systems and by default cannot refer to each others file systems, are they running in different mount namespaces?


Solution

  • It's right, containers can share files between each others only by using the volumes.

    Assume that volume mounting is just the same as mounting network partition. So there is no conflicts with OS or namespaces (we are talking about presistent volumes).