Kubernetes mount.nfs: access denied by server while mounting
It's probably because the uid used in your pod/container has not enough rights on the NFS server.
You can runAsUser as mentioned by @Giorgio or try to edit uid-range annotations of your namespace and fix a value (ex : 666). Like this every pod in your namespace will run with uid 666.
Don't forget to chown 666
properly your NFS directory.
The complete solution for kubernetes cluster to prepare NFS folders provisioning is to apply the followings:
# set folder permissionsudo chmod 666 /your/folder/ # maybe 777# append new line on exports file to allow network access to foldersudo bash -c "echo '/your/folder/ <network ip/range>(rw,sync,no_root_squash,subtree_check)' >> /etc/exports"# set folder exportsudo exportfs -ra