用路径在EK中创建持久性音量

发布于 2025-01-31 11:31:22 字数 608 浏览 6 评论 0原文

我想在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

红尘作伴 2025-02-07 11:31:22

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文