Comments on: How to Configure NFS based Persistent Volume in Kubernetes https://www.linuxtechi.com/configure-nfs-persistent-volume-kubernetes/ Wed, 13 Sep 2023 08:39:47 +0000 hourly 1 By: Rok https://www.linuxtechi.com/configure-nfs-persistent-volume-kubernetes/#comment-58389 Wed, 13 Sep 2023 08:39:47 +0000 https://www.linuxtechi.com/?p=11122#comment-58389 After running container returned default index page because the mountpoint and default web page location didn’t match.

You can inspect the pod itself with ‘kubectl exec -it nginx-pv-pod — bash’ and cd to /usr/share/nginx/html’ to find the mounter index.html file.

]]>
By: Pradeep Kumar https://www.linuxtechi.com/configure-nfs-persistent-volume-kubernetes/#comment-47550 Tue, 03 Jan 2023 03:53:11 +0000 https://www.linuxtechi.com/?p=11122#comment-47550 In reply to Caden Michael Weiner.

Hi,

It is not mandatory to configure NFS on master node. You can even configure your NFS server outside of K8s cluster nodes. But make sure you have allowed the subnets of your master and worker nodes in NFS configurations. Allow NFS ports in OS firewall and create SELinux rule if applicable.

]]>
By: Caden Michael Weiner https://www.linuxtechi.com/configure-nfs-persistent-volume-kubernetes/#comment-46061 Wed, 07 Dec 2022 18:42:30 +0000 https://www.linuxtechi.com/?p=11122#comment-46061 Hi Pradeep,
I am currently trying to follow the tutorial, however when I attempt to create the pod it gives me the following error:
Warning FailedMount 73s (x9 over 3m21s) kubelet MountVolume.SetUp failed for volume “nfs-pv” : mount failed: exit status 32
Mounting command: mount
Mounting arguments: -t nfs -o hard,nfsvers=4.1 10.230.87.167:/opt/k8s-pods/data /var/lib/kubelet/pods/833f9b8d-fa7b-4666-bb6c-c9cf5796f579/volumes/kubernetes.io~nfs/nfs-pv
Output: mount.nfs: access denied by server while mounting 10.230.87.167:/opt/k8s-pods/data

I have set up the client and server up and am able to transfer files between them using nfs. I have setup the nfs on one of my worker nodes, but my master and other worker node can access it. Is it required for the nfs share to be located on the master and not a worker node?

]]>
By: Raghavendra Gujjar https://www.linuxtechi.com/configure-nfs-persistent-volume-kubernetes/#comment-29777 Mon, 07 Mar 2022 07:24:43 +0000 https://www.linuxtechi.com/?p=11122#comment-29777 can we use those nfs-pvc into deployments, please explain if its possible

]]>
By: Pradeep Kumar https://www.linuxtechi.com/configure-nfs-persistent-volume-kubernetes/#comment-23267 Wed, 09 Jun 2021 11:08:15 +0000 https://www.linuxtechi.com/?p=11122#comment-23267 In reply to Krishan Kumar Pareek.

Hi Krishan,

It seems like NFS server is not reachable from your worker nodes. Please make sure connectivity is there among the NFS server and K8s nodes.
For testing you can try to mount the nfs share manually on worker nodes using mount.

]]>
By: Krishan Kumar Pareek https://www.linuxtechi.com/configure-nfs-persistent-volume-kubernetes/#comment-23266 Wed, 09 Jun 2021 10:06:54 +0000 https://www.linuxtechi.com/?p=11122#comment-23266 Facing the following error:

Warning FailedMount 4m5s (x45 over 137m) kubelet, ip-172-168-10-227.us-east-2.compute.internal Unable to attach or mount volumes: unmounted volumes=[nfs-pv2], unattached volumes=[nfs-pv2 default-token-ln9bq]: timed out waiting for the condition

Could you please guide?

]]>