1.不能挂载的节点报错
从报错可以看到pod中的挂载点已经存在了,不能创建
RunContainerError (failed to start container "0ea31f12b87474dbd125a3999114afae53fb92b2c1106d5e65110170e3f3ac80": Error response from daemon: error while creating mount source path '/var/lib/kubelet/pods/a0098332-f18f-4566-804d-9cd801439376/volumes/kubernetes.io~csi/pvc-smb-jjfa/mount': mkdir /var/lib/kubelet/pods/a0098332-f18f-4566-804d-9cd801439376/volumes/kubernetes.io~csi/pvc-smb-jjfa/mount: file exists) | Last state: Terminated with 128: ContainerCannotRun (error while creating mount source path '/var/lib/kubelet/pods/a0098332-f18f-4566-804d-9cd801439376/volumes/kubernetes.io~csi/pvc-smb-jjfa/mount': mkdir /var/lib/kubelet/pods/a0098332-f18f-4566-804d-9cd801439376/volumes/kubernetes.io~csi/pvc-smb-jjfa/mount: file exists), started: Tue, Jan 23 2024 9:32:58 am, finished: Tue, Jan 23 2024 9:32:58 am CrashLoopBackOff (back-off 10s restarting failed container=nginx1 pod=nginx1-65b8d4cf48-vl6q7_wfs-test(a0098332-f18f-4566-804d-9cd801439376)) | Last state: Terminated with 128: ContainerCannotRun (error while creating mount source path '/var/lib/kubelet/pods/a0098332-f18f-4566-804d-9cd801439376/volumes/kubernetes.io~csi/pvc-smb-jjfa/mount': mkdir /var/lib/kubelet/pods/a0098332-f18f-4566-804d-9cd801439376/volumes/kubernetes.io~csi/pvc-smb-jjfa/mount: file exists), started: Tue, Jan 23 2024 9:32:47 am, finished: Tue, Jan 23 2024 9:32:47 am
查看插件中的cifs可以用看到
/var/lib/kubelet/plugins/kubernetes.io/csi/pv/pvc-smb-jjfa/globalmount
查看其详细信息,显示如下,且root账户无法更改属主或者权限,报错无法访问"/var/lib/kubelet/plugins/kubernetes.io/csi/pv/pvc-smb-jjfa/globalmount": 权限不够
d????????? ? ? ? ? ? globalmount
处理方法,重新创建一个新的pv及pvc,新的pvc可以在任何挂载点进行挂载
标签:pv,cifs,mount,kubelet,pvc,io,var,k8s,smb From: https://www.cnblogs.com/xiaoxiaomuyuyu/p/17982344