Make NFS shares visible inside a Kubernetes pod running on Openstack Make NFS shares visible inside a Kubernetes pod running on Openstack kubernetes kubernetes

Make NFS shares visible inside a Kubernetes pod running on Openstack


I do not have experience with OpenShift so I am not sure how environment specific it would be. But to be able to access NFS from pods you need to ensure that it is visible for a pod and that the NFS already exists as the pod only accesses the NFS - if traditional ways fail, you can also try to play with routes.

Pods always see only their own network unless you expose them through a service.

First you will have to create a service to expose the NFS server to Pod/Pods. Then run the NFS server image in desired pod.

You can find detailed how-to here. I was also able to find this from official OpenShift documentation, as it seems it is pretty classic. The requirement is similar to other platforms:

Each NFS volume must be mountable by all schedulable nodes in the cluster.