<pre><code>kubectl logs nfs-685944f556-r2pjr                     
Serving /exports
Serving /
rpcinfo: can't contact rpcbind: : RPC: Unable to receive; errno = Connection refused
Starting rpcbind
exportfs: / does not support NFS export
NFS started
</code></pre>

<p>nfs.deployment.yaml:</p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: nfs
  labels:
    app: nfs
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nfs
  template:
    metadata:
      labels:
        app: nfs
    spec:
      containers:
      - name: nfs-server
        image: gcr.io/google_containers/volume-nfs:0.8
        ports:
          - name: nfs
            containerPort: 2049
          - name: mountd
            containerPort: 20048
          - name: rpcbind
            containerPort: 111
        securityContext:
          privileged: true
        volumeMounts:
          - mountPath: /exports
            name: mypvc
      volumes:
        - name: mypvc
          persistentVolumeClaim:
            claimName: nfs-data
</code></pre>

<p>What does exportfs refer to? How can I diagnose this further?</p>

<p>Within the nfs pod, not too sure why it's exporting <code>/</code>?</p>

<pre><code>[root@nfs-685944f556-r2pjr /]# cat /etc/exports
/exports *(rw,fsid=0,insecure,no_root_squash)
/ *(rw,fsid=0,insecure,no_root_squash)
</code></pre>

Chris Stryczynski
<blockquote>
  <p>not too sure why it's exporting /</p>
</blockquote>

<p>It is done by <a href="https://github.com/kubernetes/examples/blob/master/staging/volumes/nfs/nfs-data/run_nfs.sh" rel="nofollow noreferrer">run_nfs.sh</a> script, running with two arguments:</p>

<pre><code>/bin/bash /usr/local/bin/run_nfs.sh /exports /
</code></pre>

<p>There's an issue with the image <a href="https://pantheon.corp.google.com/gcr/images/google-containers/GLOBAL/volume-nfs?gcrImageListsize=30" rel="nofollow noreferrer">gcr.io/google_containers/volume-nfs</a>, so it is  suggested to use <a href="https://hub.docker.com/r/jsafrane/nfs-data/" rel="nofollow noreferrer">jsafrane/nfs-data</a> image instead</p>

<p>See the corresponding github <a href="https://github.com/kubernetes/kubernetes/issues/24687" rel="nofollow noreferrer">discussion</a> </p>
