操作系统:阿里云上虚拟机 ubuntu 20.04
k8s: 1.23.5
nfs: 阿里云nas
storage建立成功后,pvc显示mounted,建pod提示如下:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 9m43s default-scheduler Successfully assigned default/example-pv-pod to k8s-node1
Warning FailedMount 7m40s kubelet Unable to attach or mount volumes: unmounted volumes=[example-pv-storage], unattached volumes=[kube-api-access-xxp6l example-pv-storage]: timed out waiting for the condition
Warning FailedMount 89s (x12 over 9m43s) kubelet MountVolume.SetUp failed for volume "pvc-8e1733be-b6bd-4320-af3e-6cdeeae856d7" : mount failed: exit status 32
Mounting command: mount
通过查询,应该是 nfs-utils 服务未开导致的,在集群中2台虚拟机上开启服务