kubelet无法创建安装点'

问题描述 投票:1回答:1

我创建nfs pvc。我在部署YAML中使用了它。但是当我应用YAML文件时。我收到以下错误

Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/341e752b-acbb-4c26-a664-a25b5f1dd28b/volumes/kubernetes.io~nfs/data-certification-files-pv --scope -- mount -t nfs 192.168.123.95:/mnt/nfs/certification /var/lib/kubelet/pods/341e752b-acbb-4c26-a664-a25b5f1dd28b/volumes/kubernetes.io~nfs/data-certification-files-pv
Output: Running scope as unit run-25571.scope.
mount.nfs: Stale file handle
  Warning  FailedMount  13m  kubelet, server08  MountVolume.SetUp failed for volume "data-certification-files-pv" : mount failed: exit status 32

然后我检查kubelet日志,得到了这个


6月 11 17:06:56 server08 kubelet[16597]: E0611 17:06:56.977097   16597 kubelet.go:1681] Unable to attach or mount volumes for pod "weedfs-master-7b95f44996-xt427_runsdata(341e752b-acbb-4c26-a664-a25b5f1dd28b)": unmounted volumes=[data], unattached volumes=[default-token-7xtzl log data]: timed out waiting for the condition; skipping pod6月 11 17:06:56 server08 kubelet[16597]: E0611 17:06:56.977150   16597 pod_workers.go:191] Error syncing pod 341e752b-acbb-4c26-a664-a25b5f1dd28b ("weedfs-master-7b95f44996-xt427_runsdata(341e752b-acbb-4c26-a664-a25b5f1dd28b)"), skipping: unmounted volumes=[data], unattached volumes=[default-token-7xtzl log data]: timed out waiting for the condition
6月 11 17:07:23 server08 kubelet[16597]: E0611 17:07:23.636510   16597 mount_linux.go:150] Mount failed: exit status 326月 11 17:07:23 server08 kubelet[16597]: Mounting command: systemd-run
6月 11 17:07:23 server08 kubelet[16597]: Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/341e752b-acbb-4c26-a664-a25b5f1dd28b/volumes/kubernetes.io~nfs/data-certification-files-pv --scope -- mount -t nfs 192.168.123.95:/mnt/nfs/certification /var/lib/kubelet/pods/341e752b-acbb-4c26-a664-a25b5f1dd28b/volumes/kubernetes.io~nfs/data-certification-files-pv
6月 11 17:07:23 server08 kubelet[16597]: Output: Running scope as unit run-30998.scope.6月 11 17:07:23 server08 kubelet[16597]: mount.nfs: Stale file handle6月 11 17:07:23 server08 kubelet[16597]: E0611 17:07:23.637271   16597 nestedpendingoperations.go:301] Operation for "{volumeName:kubernetes.io/nfs/341e752b-acbb-4c26-a664-a25b5f1dd28b-data-certification-files-pv podName:341e752b-acbb-4c26-a664-a25b5f1dd28b nodeName:}" failed. No retries permitted until 2020-06-11 17:09:25.637186297 +0800 CST m=+7477.442805373 (durationBeforeRetry 2m2s). Error: "MountVolume.SetUp failed for volume \"data-certification-files-pv\" (UniqueName: \"kubernetes.io/nfs/341e752b-acbb-4c26-a664-a25b5f1dd28b-data-certification-files-pv\") pod \"weedfs-master-7b95f44996-xt427\" (UID: \"341e752b-acbb-4c26-a664-a25b5f1dd28b\") : mount failed: exit status 32\nMounting command: systemd-run\nMounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/341e752b-acbb-4c26-a664-a25b5f1dd28b/volumes/kubernetes.io~nfs/data-certification-files-pv --scope -- mount -t nfs 192.168.123.95:/mnt/nfs/certification /var/lib/kubelet/pods/341e752b-acbb-4c26-a664-a25b5f1dd28b/volumes/kubernetes.io~nfs/data-certification-files-pv\nOutput:Running scope as unit run-30998.scope.\nmount.nfs: Stale file handle\n"

我检查安装点:

[root@server08 pods]# ll  /var/lib/kubelet/pods/341e752b-acbb-4c26-a664-a25b5f1dd28b/volumes/kubernetes.io~nfs/data-certification-files-pv 
ls: cannot access /var/lib/kubelet/pods/341e752b-acbb-4c26-a664-a25b5f1dd28b/volumes/kubernetes.io~nfs/data-certification-files-pv: No such file or directory
[root@server08 pods]# ll  /var/lib/kubelet/pods/341e752b-acbb-4c26-a664-a25b5f1dd28b/volumes/kubernetes.io~nfs
total 0

其他信息:kubeadm版本1.18 kubelet 1.18

为什么Kubelet不创建挂载点目录?

kubernetes nfs kubelet nfsclient
1个回答
1
投票

我不知道为什么,我用通配符*替换了特定的IP,然后重新启动NFS,它起作用了

© www.soinside.com 2019 - 2024. All rights reserved.