【问题标题】:NFS or other ReadWriteMany volumes for GKE AutoPilotGKE AutoPilot 的 NFS 或其他 ReadWriteMany 卷
【发布时间】:2021-08-18 17:55:58
【问题描述】:

我可以在 GKE 上为 rwmany 找到的唯一选项是 NFS,我学习了本教程:

https://medium.com/@Sushil_Kumar/readwritemany-persistent-volumes-in-google-kubernetes-engine-a0b93e203180

唯一的问题是它包含规范

    spec:
      containers:
        - name: nfs-server
          image: k8s.gcr.io/volume-nfs:0.8
          ports:
            - name: nfs
              containerPort: 2049
            - name: mountd
              containerPort: 20048
            - name: rpcbind
              containerPort: 111
          securityContext:
            privileged: true

问题是privileged: true。这在 AutoPilot 上是不允许的。有什么想法可以绕过这个限制吗?

【问题讨论】:

标签: kubernetes google-cloud-platform google-kubernetes-engine nfs


【解决方案1】:

正如我在documentation 中看到的,Autopilot 中不允许使用特权容器,这可能是 NFS 服务器无法工作的原因。

我的建议是

  1. 使用标准集群
  2. 让 NFS 服务器在集群外部,就像在普通 VM 中一样
  3. 使用像Filestore这样的托管服务

【讨论】:

  • 2.是我一起去的。不过,这似乎是一个丑陋的 hack,我希望可能有更好的解决方案
猜你喜欢
  • 1970-01-01
  • 2022-10-19
  • 2022-11-11
  • 2021-08-08
  • 2021-10-26
  • 2023-03-11
  • 2018-08-12
  • 1970-01-01
  • 2023-04-04
相关资源
最近更新 更多