错误描述
环境:Debian 10 buster
OS:x86_64 Linux 4.19.0-6-cloud-amd64
Pod出现FailedMount:MountVolume.SetUp failed for volume “pv” : mount failed: exit status 32
kubectl describe 后日志输出为mount.nfs: access denied by server while mounting …
查看日志输出为: cat /var/log/messages
可以看到使用的是nfsv4.1
解决办法:
vi /etc/sysconfig/nfs 输入
# Turn off v2 and v3 protocol support
RPCNFSDARGS="-N 2 -N 3"
# Turn off v4 protocol support
RPCNFSDARGS="-N 4"
然后重启nfs服务
/etc/init.d/nfs-kernel-server restart
重现创建pv、statefulset即可