用路径在EK中创建持久性音量
我想在EKS中使用路径创建持久卷,因此在本地开发环境中,我使用了以下清单文件。我确实在EKS中应用了相同的清单文件,并且它创建了PV而没有任何错误,但是没有路径目录。
apiVersion: v1
kind: PersistentVolume
metadata:
name: metadata-collector-data
spec:
capacity:
storage: 250G
volumeMode: Filesystem
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: default-class
local:
path: /mnt/content_selection_platform/data/metadata-collector/movies
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: role
operator: In
values:
- cpu-node
I want to create persistence volume with path in EKS, so in local development environment I used following manifest file. I did apply the same manifest file in EKS and it created PV without any error but there is no path directory.
apiVersion: v1
kind: PersistentVolume
metadata:
name: metadata-collector-data
spec:
capacity:
storage: 250G
volumeMode: Filesystem
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: default-class
local:
path: /mnt/content_selection_platform/data/metadata-collector/movies
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: role
operator: In
values:
- cpu-node
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
documentation 对此并不是很明确,但是本地的光盘和目录本地持续的数量越来越多,需要预先解决。因此,重要的是将局部持久量专门指向使用 nodeaffinity 的正确节点。
The documentation is not very explicit about it, but the discs and directories local Persistent Volumes are mounting need to get pre-provisioned. Hence, it is important to point local Persistent Volumes specifically to the correct node with nodeAffinity.