1.查看pod,状态:CreateContainerError
2.查看events
Events:
Type Reason Age From Message
Normal Scheduled default-scheduler Successfully assigned paas-admin/esdb-10-b44887dd7-rghqx to 10...*
Warning FailedMount 9m8s kubelet, 10...* MountVolume.SetUp failed for volume “esdb-10nfsclientroot” : mount failed: exit status 32
Mounting command: systemd-run
Mounting arguments: --description=Kubernetes transient mount for /apps/kubernetes/pods/f0d9394f-fa23-4915-ba80-c6c1df0743da/volumes/kubernetes.io~nfs/esdb-10nfsclientroot --scope – mount -t nfs 192.168.65.22:/esdb-10 /apps/kubernetes/pods/f0d9394f-fa23-4915-ba80-c6c1df0743da/volumes/kubernetes.io~nfs/esdb-10nfsclientroot
Output: Running scope as unit run-11921.scope.
mount.nfs: Connection timed out
挂载失败检查思路:
1.查看需要升级的nfs服务器所在的主机,具体可以看环境文档,如果文档暂时无法获取,可以通过ansible查看环境所有主机,追加出来,然后通过grep顾虑出挂载了共享存储的主机,查看nfs服务器的ip或者域名和路径。
2.需要将pod运行在挂载了共享存储的主机上,在yaml文件里打lable,让pod运行在固定的主机上。
备注:如果nfs服务地址写的域名,需要验证pod所在主机能否解析此域名,此为排错中的一部分。