将EFS卷附加到Kubernetes

将EFS卷附加到Kubernetes

本文介绍了将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:

推荐答案

对我来说,问题是我在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时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 20:23