k8s中pod启动报存储相关问题总结

报错1: Volume已经被绑定

Multi-Attach error for Volume is already exclusively attached to one node and can't be attached to another

原因

  • pod不是被正常关闭,强制删除有可能没有删除pod与volume绑定关系

如何解决

# 获取绑定关系
kubectl -n newpower get volumeattachment
# 删除pod所关联的volumeattachment
kubectl -n newpower delete volumeattachment csi-fcfe0c84e304b8a452669e1015684edfd74914c67efe62f214cd9ce71090a51d

报错2:rpc异常

Warning FailedMount 44s (x2 over 108s) kubelet MountVolume.MountDevice failed for volume "pvc-e09f23da-f21b-4365-a24b-528d026355ee" : rpc error: code = Aborted desc = an operation with the given Volume ID 0001-0009-rook-ceph-000000000000000a-32b04bb7-ae3e-11eb-a9c8-ae53b05a732a already exists

原因

  • 一般rpc异常先排除rook中ceph服务是否可用,如果不可用先恢复ceph服务

你可能感兴趣的:(k8s,kubernetes,容器,云原生)