Search code examples
namespaceskubernetesmounts3fs

Share mount namespace with a privileged pod


I am trying to get the mount point details of host from a kuberentes pod. It is a privileged container. Even if I mount the root file system , I am not able to check the mount details of a particular type say s3fsmay be because it belongs to a different namespace. What is the best way to share the mount point namespace.


Solution

  • I did some research and found that kubernetes provides an option called MountPropagation which helps to achieve my requirement.

    I tested this feature in my local set up and it did give me the result I wanted.

    Few links that I found useful:

    https://medium.com/kokster/kubernetes-mount-propagation-5306c36a4a2d https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation