Kubernetes NFS volume mount fail with exit status 32

前端 未结 5 802
遥遥无期
遥遥无期 2020-12-24 16:02

I have a Kubernetes setup installed in my Ubuntu machine. I\'m trying to setup a nfs volume and mount it to a container according to this http://kubernetes.io/v1.1/examples/

相关标签:
5条回答
  • 2020-12-24 16:07

    I had the same problem, and I solved it by installing nfs-common in every Kubernetes nodes.

    apt-get install -y nfs-common
    

    My nodes were installed without nfs-common. Kubernetes will ask each node to mount the NFS into a specific directory to be available to the pod. As mount.nfs was not found, the mounting process failed.

    Good luck!

    0 讨论(0)
  • 2020-12-24 16:11

    In my case the issue was that i hadn't declared the host server of the nfs in the /etc/exports file. After adding an entry in there for my host server, the volume was working correctly.

    if you modify the file in anyway then you need restart the service too;

    sudo systemctl restart nfs-kernel-server
    

    An example of an entry in the /etc/exports file;

    /var/nfs/home   192.111.222.333(rw,sync,no_subtree_check)
    
    0 讨论(0)
  • 2020-12-24 16:15

    It looks like volumes.nfs.server=192.168.3.201 is incorrectly configured on your client. It should be set to the ClusterIP address of your nfs-server Service.

    0 讨论(0)
  • 2020-12-24 16:20

    Had the same issue with NFS which only allowed root mounts. fixed by:

    a. allow non-root users to mount NFS (on the server).

    or

    b. in PersistentVolume add

      mountOptions:
        - nfsvers=4.1
    
    0 讨论(0)
  • 2020-12-24 16:29

    I fixed this issue by installing nfs-utils on the worker nodes.

    0 讨论(0)
提交回复
热议问题