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

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

问题描述

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

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:

等待卷附加或挂载为 poddefault"/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天全站免登陆