<p>I have a folder of TFRecords on a network that I want to expose to multiple pods. The folder has been exported via NFS.</p>

<p>I have tried creating a Persistent Volume, followed by a Persistent Volume Claim. However, that just creates a folder inside the NFS mount, which I don't want. Instead, I want to Pod to <em>access</em> the folder with the TFRecords.</p>

<p>I have listed the manifests for the PV and PVC. </p>

<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: nfs-tfrecord-pv
spec:
  capacity:
    storage: 30Gi
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  nfs:
    path: /media/veracrypt1/
    server: 1.2.3.4
    readOnly: false
</code></pre>

<pre><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: nfs-tfrecord-pvc
  namespace: default
spec:
  accessModes:
    - ReadWriteMany
  storageClassName: nfs-tfrecord
  resources:
    requests:
      storage: 1Gi
</code></pre>

<p>I figured it out. The issue was I was looking at the problem the wrong way. I didn't need any <em>provisioning</em>. Instead, what was need was to simply mount the NFS volume within the container:</p>

<pre><code>kind: Pod
apiVersion: v1
metadata:
  name: pod-using-nfs
spec:
  containers:
    - name: app
      image: alpine
      volumeMounts:
      - name: data
        mountPath: /mnt/data
      command: ["/bin/sh"]
      args: ["-c", "sleep 500000"]
  volumes:
  - name: data
    nfs:
      server: 1.2.3.4
      path: /media/foo/DATA
</code></pre>
