gpt4 book ai didi

kubernetes - kubelet无法创建挂载点

转载 作者:行者123 更新时间:2023-12-02 12:11:36 25 4
gpt4 key购买 nike

我创建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不创建挂载点目录?

最佳答案

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

关于kubernetes - kubelet无法创建挂载点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62321290/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com