将EFS卷附加到Kubernetes Pod时遇到问题 [英] Facing an issue with attaching EFS volume to Kubernetes pods

查看:363
本文介绍了将EFS卷附加到Kubernetes Pod时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在AWS EKS上的kubernetes集群的帮助下运行docker容器.我的两个Docker容器正在使用共享卷,并且这两个容器都在两个不同的容器中运行.因此,我想要一个可以被aws上的两个吊舱使用的通用卷.

I am running my docker containers with the help of kubernetes cluster on AWS EKS. Two of my docker containers are using shared volume and both of these containers are running inside two different pods. So I want a common volume which can be used by both the pods on aws.

我创建了一个EFS卷并安装了它.我正在跟踪创建PersistentVolumeClaim的链接.但是当efs-provider pod尝试附加已挂载的EFS卷空间时,出现超时错误. VolumeId,区域仅是正确的.

I created an EFS volume and mounted. I am following link to create PersistentVolumeClaim. But I am getting timeout error when efs-provider pod trying to attach mounted EFS volume space. VolumeId, region are correct only.

针对Pod的详细错误消息描述:

Detailed Error message for Pod describe:

超时已到期,正在等待卷挂接或挂接Pod默认"/"efs-provisioner-55dcf9f58d-r547q".未安装卷的列表= [pv-volume].未连接卷的列表= [pv-volume default-token-lccdw]
卷"pv-volume"的MountVolume.SetUp失败:安装失败:退出状态32

timeout expired waiting for volumes to attach or mount for pod "default"/"efs-provisioner-55dcf9f58d-r547q". list of unmounted volumes=[pv-volume]. list of unattached volumes=[pv-volume default-token-lccdw]
MountVolume.SetUp failed for volume "pv-volume" : mount failed: exit status 32

推荐答案

对我来说,问题是我在PV中指定的路径与/不同.并且在该路径之外被引用的NFS服务器上的目录尚不存在.我必须先手动创建该目录.

The problem for me was that I was specifying a different path in my PV than /. And the directory on the NFS server that was referenced beyond that path did not yet exist. I had to manually create that directory first.

这篇关于将EFS卷附加到Kubernetes Pod时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆