Kubernetes NFS Persistent Volumes - multiple claims on same volume? Claim stuck in pending?

后端 未结 4 1810
遥遥无期
遥遥无期 2020-12-17 08:51

Use case:

I have a NFS directory available and I want to use it to persist data for multiple deployments & pods.

I have created a PersistentVolume<

4条回答
  •  旧巷少年郎
    2020-12-17 09:09

    From: https://docs.openshift.org/latest/install_config/storage_examples/shared_storage.html

    As Baroudi Safwen mentioned, you cannot bind two pvc to the same pv, but you can use the same pvc in two different pods.

    volumes:
    - name: nfsvol-2
      persistentVolumeClaim:
        claimName: nfs-pvc-1 <-- USE THIS ONE IN BOTH PODS   
    

提交回复
热议问题