【K8S】bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper

1.pvc无法绑定成功

bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program


[root@K8S1 work]# kubectl describe -f fgedu-nginx-nfs1.yaml
Pod 'fgedu-nginx-nfs1': error 'pods "fgedu-nginx-nfs1" not found', but found events.
Events:
  Type     Reason       Age                   From               Message
  ----     ------       ----                  ----               -------
  Normal   Scheduled    11m                   default-scheduler  Successfully assigned default/fgedu-nginx-nfs1 to k8s5
  Warning  FailedMount  6m42s                 kubelet            Unable to attach or mount volumes: unmounted volumes=[nfs-app-pv001], unattached volumes=[kube-api-access-sblx6 nfs-app-pv001]: timed out waiting for the condition
  Warning  FailedMount  2m46s (x12 over 11m)  kubelet            MountVolume.SetUp failed for volume "nfs-app-pv001" : mount failed: exit status 32
Mounting command: mount
Mounting arguments: -t nfs 192.168.1.11:/data/nfs/app-pv001 /var/lib/kubelet/pods/9b60dc70-37a2-40ec-b54f-4e496cf78575/volumes/kubernetes.io~nfs/nfs-app-pv001
Output: mount: /var/lib/kubelet/pods/9b60dc70-37a2-40ec-b54f-4e496cf78575/volumes/kubernetes.io~nfs/nfs-app-pv001: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program.
  Warning  FailedMount  2m8s (x3 over 8m58s)  kubelet  Unable to attach or mount volumes: unmounted volumes=[nfs-app-pv001], unattached volumes=[nfs-app-pv001 kube-api-access-sblx6]: timed out waiting for the condition


[root@K8S1 work]# mount 192.168.1.11:/data/nfs /data/nfs/
mount: /data/nfs: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program.

2.现在并安装nfs ;

原因是客户端未安装NFS;

https://mirrors.aliyun.com/centos/8/BaseOS/x86_64/os/Packages/
nfs-utils-2.3.3-46.el8.x86_64.rpm
rpcbind-1.2.5-8.el8.x86_64.rpm
gssproxy-0.8.0-19.el8.x86_64.rpm

rpm -ivh gssproxy-0.8.0-19.el8.x86_64.rpm --nodeps
rpm -ivh rpcbind-1.2.5-8.el8.x86_64.rpm
rpm -ivh nfs-utils-2.3.3-46.el8.x86_64.rpm

systemctl start rpcbind


--重新Mount就可以mount成功
mount 192.168.1.11:/data/nfs /data/nfs/

centos8.4的安装包中没有nfs相关软件,需要单独下载,只需要启动 rpcbind便可 mount;

Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 41s default-scheduler Successfully assigned default/nfs-server to node-zzt01 Normal Pulling 25s (x2 over 40s) kubelet Pulling image "quay.io/coreos/nfs-provisioner:v1.0.0" Warning Failed 23s (x2 over 38s) kubelet Failed to pull image "quay.io/coreos/nfs-provisioner:v1.0.0": rpc error: code = Unknown desc = failed to pull and unpack image "quay.io/coreos/nfs-provisioner:v1.0.0": failed to resolve reference "quay.io/coreos/nfs-provisioner:v1.0.0": unexpected status from HEAD request to https://quay.io/v2/coreos/nfs-provisioner/manifests/v1.0.0: 401 UNAUTHORIZED Warning Failed 23s (x2 over 38s) kubelet Error: ErrImagePull Normal BackOff 9s (x2 over 37s) kubelet Back-off pulling image "quay.io/coreos/nfs-provisioner:v1.0.0" Warning Failed 9s (x2 over 37s) kubelet Error: ImagePullBackOff node.kubernetes.io/unreachable:NoExecute op=Exists for 300s Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 8m27s default-scheduler Successfully assigned default/busybox-deploy-5946d7b5f-j8n5h to node-zzt02 Warning FailedMount 7m23s (x8 over 8m27s) kubelet MountVolume.SetUp failed for volume "busybox-pv" : mount failed: exit status 32 Mounting command: mount Mounting arguments: -t nfs nfs-server:/exports /var/lib/kubelet/pods/581310dc-13ce-4043-83fc-9b6394bf4c3a/volumes/kubernetes.io~nfs/busybox-pv Output: mount: /var/lib/kubelet/pods/581310dc-13ce-4043-83fc-9b6394bf4c3a/volumes/kubernetes.io~nfs/busybox-pv: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program. Warning FailedMount 6m24s kubelet Unable to attach or mount volumes: unmounted volumes=[busybox-storage], unattached volumes=[busybox-storage kube-api-access-rqnnh]: timed out waiting for the condition Warning FailedMount 2m3s (x2 over 4m18s) kubelet Unable to attach or mount volumes: unmounted volumes=[busybox-storage], unattached volumes=[busybox-storage kube-api-access-rqnnh]: timed out waiting for the condition Warning FailedMount 8s (x11 over 6m20s) kubelet MountVolume.SetUp failed for volume "busybox-pv" : mount failed: exit status 32 Mounting command: mount Mounting arguments: -t nfs nfs-server:/exports /var/lib/kubelet/pods/581310dc-13ce-4043-83fc-9b6394bf4c3a/volumes/kubernetes.io~nfs/busybox-pv Output: mount: /var/lib/kubelet/pods/581310dc-13ce-4043-83fc-9b6394bf4c3a/volumes/kubernetes.io~nfs/busybox-pv: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program.
07-06
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值