<p>I've been using <a href="https://github.com/kubernetes/examples/blob/master/staging/volumes/nfs/README.md" rel="nofollow noreferrer">https://github.com/kubernetes/examples/blob/master/staging/volumes/nfs/README.md</a> as a guide.</p>

<p>I've successfully set the above working. However I'm not able to locate where the actual "NFS Volume" is located at - I'm guessing it's just an ordinary directory.</p>

<p>I have two goals here:</p>

<ul>
<li>To prepopulate the volume / directory initially</li>
<li>To make a backup of this volume / directory</li>
</ul>

<p><strong>nfs-pvc.yaml</strong></p>

<pre><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: nfs
spec:
  accessModes:
    - ReadWriteMany
  storageClassName: ""
  resources:
    requests:
      storage: 1Mi
</code></pre>

<p>This deployment is GCE specific NFS. NFS server run as POD in the cluster <code>image: gcr.io/google_containers/volume-nfs:0.8</code></p>

<p>looks at this deployment file <a href="https://github.com/kubernetes/examples/blob/master/staging/volumes/nfs/nfs-server-rc.yaml" rel="nofollow noreferrer">https://github.com/kubernetes/examples/blob/master/staging/volumes/nfs/nfs-server-rc.yaml</a></p>

<p>This pod acts as NFS server. if you run `kubectl get pods' you will see nfs-server pod is running.</p>

<p><code>volume-nfs:</code> is google image, not familer with all the features. I can see the <code>kubectl cp</code> option to copy the file to and from the NFS server POD.</p>

<p><a href="https://kubernetes.io/docs/user-guide/kubectl/v1.7/#cp" rel="nofollow noreferrer">https://kubernetes.io/docs/user-guide/kubectl/v1.7/#cp</a></p>

<p>eg:</p>

<pre><code>kubectl cp /tmp/foo &lt;some-namespace&gt;/nfs-server:/exports
</code></pre>

<p>The above command will only work if the <code>tar</code> executable is present on the container.</p>
