Kubernetes Azure磁盘动态PVC挂载超时,Pod持续处于ContainerCreating状态求助
ContainerCreating State I'm hitting a roadblock where a dynamic Persistent Volume Claim (PVC) using Azure Disk is timing out during the mount process, leaving my pod permanently stuck in the ContainerCreating state.
When I run kubectl describe pod myPod, these warning messages pop up:
Warning FailedMount 1m (x5 over 12m) kubelet, k8-node-2 无法挂载Pod "mongodb-76bd56459f-hxjdc_kubeapps(8189f2e4-0017-11e8-82ac-000d3aa33484)"的卷:等待卷挂载/附加超时,未挂载/未附加卷列表=[data]
Warning FailedMount 21s (x8 over 12m) kubelet, k8-node-2(合并相似事件):卷"pvc-516aeece-ff9d-11e7-82ac-000d3aa33484"的MountVolume.SetUp失败:挂载失败,退出状态32
挂载命令:systemd-run
挂载参数:--description=Kubernetes transient mount for /var/lib/kubelet/pods/8189f2e4-0017-11e8-82ac-000d3aa33484/volumes/kubernetes.io~azure-disk/pvc-516aeece-ff9d-11e7-82ac-000d3aa33484 --scope -- mount -t ext4 -o bind /var/lib/kubelet/plugins/kubernetes.io/azure-disk/mounts/m3083936425 /var/lib/kubelet/pods/8189f2e4-0017-11e8-82ac-000d3aa33484/volumes/kubernetes.io~azure-disk/pvc-516aeece-ff9d-11e7-82ac-000d3aa33484
输出:Running scope as unit run-rf9126bab6fba44d9a499370260ed5fe8.scope. mount: special device /var/lib/kubelet/plugins/kubernetes.io/azure-disk/mounts/m3083936425 does not exist
Cluster Details
- Bare-metal cluster deployed via
kubeadm: 1 Master node, 2 Minion nodes - All nodes are Ubuntu 16.04 LTS VMs hosted on Azure
- Kubernetes version info:
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:52:23Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.2", GitCommit:"5fa2db2bd46ac79e5e00a4e6ed24191080aa463b", GitTreeState:"clean", BuildDate:"2018-01-18T09:42:01Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}
Troubleshooting I've Completed
- PVC and PV are successfully bound:
~$ kubectl -n kubeapps get pvc NAME|STATUS|VOLUME|CAPACITY|ACCESS|MODES|STORAGECLASS|AGE mongodb-data|Bound|pvc-516aeece-ff9d-11e7-82ac-000d3aa33484|8Gi||RWO|k8storage |14h ~$ kubectl -n kubeapps get pv NAME|CAPACITY|ACCESS|MODES|RECLAIM POLICY|STATUS|CLAIM|STORAGECLASS|REASON|AGE pvc-516aeece-ff9d-11e7-82ac-000d3aa33484|8Gi|RWO|Retain|Bound|kubeapps/mongodb-data|k8storage| |14h
- The Azure managed disk was automatically created and attached to the correct node (verified through the Azure Portal)
I can't wrap my head around why the mount target doesn't exist even though the disk is clearly attached. Any insights or steps to fix this would be a huge help!
内容的提问来源于stack exchange,提问作者Arindam

