{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24687","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24687/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24687/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24687/events","html_url":"https://github.com/kubernetes/kubernetes/issues/24687","id":150472311,"number":24687,"title":"NFS example does not work on google container engine.  ","user":{"login":"arenoir","id":113590,"avatar_url":"https://avatars.githubusercontent.com/u/113590?v=3","gravatar_id":"","url":"https://api.github.com/users/arenoir","html_url":"https://github.com/arenoir","followers_url":"https://api.github.com/users/arenoir/followers","following_url":"https://api.github.com/users/arenoir/following{/other_user}","gists_url":"https://api.github.com/users/arenoir/gists{/gist_id}","starred_url":"https://api.github.com/users/arenoir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arenoir/subscriptions","organizations_url":"https://api.github.com/users/arenoir/orgs","repos_url":"https://api.github.com/users/arenoir/repos","events_url":"https://api.github.com/users/arenoir/events{/privacy}","received_events_url":"https://api.github.com/users/arenoir/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-04-22T21:12:04Z","updated_at":"2016-04-26T02:47:13Z","closed_at":null,"body":"The nfs example at [/examples/nfs](https://github.com/kubernetes/kubernetes/blob/release-1.2/examples/nfs/README.md) does not work on google container engine.\r\n\r\nThe nfs-server runs but the nfs-busybox won't mount the PersistentVolumeClaim.\r\n\r\nThe busybox pod errors out trying to mount the persistent volume claim.\r\n\r\n```\r\nOutput: mount.nfs: Connection timed out\r\n```\r\n\r\nThe nfs-pv uses the nfs-server service ip.  Both the persistent volume and the persistent volume claim are bound.   \r\n\r\nI did notice the nfs server logged a warning. \r\n```\r\nrpcinfo: can't contact rpcbind: : RPC: Unable to receive; errno = Connection refused\r\n```\r\n\r\nI have tried exposing additional ports 111 tcp/udp  2049/udp but that had no effect.\r\n\r\nPlease help.\r\n\r\n```\r\n#kubectl describe service nfs-server\r\nName:\t\t\tnfs-server\r\nNamespace:\t\tdefault\r\nLabels:\t\t\t<none>\r\nSelector:\t\trole=nfs-server\r\nType:\t\t\tClusterIP\r\nIP:\t\t\t10.19.247.137\r\nPort:\t\t\t<unset>\t2049/TCP\r\nEndpoints:\t\t10.16.3.4:2049\r\nSession Affinity:\tNone\r\nNo events.\r\n```\r\n\r\n```\r\n#kubectl describe pv nfs\r\nName:\t\tnfs\r\nLabels:\t\t<none>\r\nStatus:\t\tBound\r\nClaim:\t\tdefault/nfs\r\nReclaim Policy:\tRetain\r\nAccess Modes:\tRWX\r\nCapacity:\t1Mi\r\nMessage:\t\r\nSource:\r\n    Type:\tNFS (an NFS mount that lasts the lifetime of a pod)\r\n    Server:\t10.19.247.137\r\n    Path:\t/\r\n    ReadOnly:\tfalse\r\n```\r\n\r\n```\r\n#kubectl describe pvc nfs\r\nName:\t\tnfs\r\nNamespace:\tdefault\r\nStatus:\t\tBound\r\nVolume:\t\tnfs\r\nLabels:\t\t<none>\r\nCapacity:\t1Mi\r\nAccess Modes:\tRWX\r\n```\r\n\r\n```\r\n#kubectl describe pod nfs-server-e71xs\r\nName:\t\tnfs-server-e71xs\r\nNamespace:\tdefault\r\nNode:\t\tgke-fieldphone-32335ca1-node-9o0q/10.128.0.4\r\nStart Time:\tFri, 22 Apr 2016 13:39:57 -0700\r\nLabels:\t\trole=nfs-server\r\nStatus:\t\tRunning\r\nIP:\t\t10.16.3.4\r\nControllers:\tReplicationController/nfs-server\r\nContainers:\r\n  nfs-server:\r\n    Container ID:\tdocker://d0f11148b09986163c73baf525d57b4a59b3bce149f1776f117adcb444993a5c\r\n    Image:\t\tgcr.io/google_containers/volume-nfs\r\n    Image ID:\t\tdocker://3f8217a3a8f1e891612aece9cbf8b8defeb1f1ffa39836ebb7de5e03139f56a7\r\n    Port:\t\t2049/TCP\r\n    QoS Tier:\r\n      cpu:\tBurstable\r\n      memory:\tBestEffort\r\n    Requests:\r\n      cpu:\t\t100m\r\n    State:\t\tRunning\r\n      Started:\t\tFri, 22 Apr 2016 13:39:59 -0700\r\n    Ready:\t\tTrue\r\n    Restart Count:\t0\r\n    Environment Variables:\r\nConditions:\r\n  Type\t\tStatus\r\n  Ready \tTrue \r\nVolumes:\r\n  default-token-szz1v:\r\n    Type:\tSecret (a volume populated by a Secret)\r\n    SecretName:\tdefault-token-szz1v\r\nEvents:\r\n  FirstSeen\tLastSeen\tCount\tFrom\t\t\t\t\t\tSubobjectPath\t\t\tType\t\tReason\t\tMessage\r\n  ---------\t--------\t-----\t----\t\t\t\t\t\t-------------\t\t\t--------\t------\t\t-------\r\n  29m\t\t29m\t\t1\t{default-scheduler }\t\t\t\t\t\t\t\tNormal\t\tScheduled\tSuccessfully assigned nfs-server-e71xs to gke-fieldphone-32335ca1-node-9o0q\r\n  29m\t\t29m\t\t1\t{kubelet gke-fieldphone-32335ca1-node-9o0q}\tspec.containers{nfs-server}\tNormal\t\tPulling\t\tpulling image \"gcr.io/google_containers/volume-nfs\"\r\n  29m\t\t29m\t\t1\t{kubelet gke-fieldphone-32335ca1-node-9o0q}\tspec.containers{nfs-server}\tNormal\t\tPulled\t\tSuccessfully pulled image \"gcr.io/google_containers/volume-nfs\"\r\n  29m\t\t29m\t\t1\t{kubelet gke-fieldphone-32335ca1-node-9o0q}\tspec.containers{nfs-server}\tNormal\t\tCreated\t\tCreated container with docker id d0f11148b099\r\n  29m\t\t29m\t\t1\t{kubelet gke-fieldphone-32335ca1-node-9o0q}\tspec.containers{nfs-server}\tNormal\t\tStarted\t\tStarted container with docker id d0f11148b099\r\n```\r\n\r\n```\r\n#kubectl describe pod nfs-busybox-fu4el\r\nName:\t\tnfs-busybox-fu4el\r\nNamespace:\tdefault\r\nNode:\t\tgke-fieldphone-32335ca1-node-00f2/10.128.0.9\r\nStart Time:\tFri, 22 Apr 2016 13:49:25 -0700\r\nLabels:\t\tname=nfs-busybox\r\nStatus:\t\tPending\r\nIP:\t\t\r\nControllers:\tReplicationController/nfs-busybox\r\nContainers:\r\n  busybox:\r\n    Container ID:\t\r\n    Image:\t\tbusybox\r\n    Image ID:\t\t\r\n    Port:\t\t\r\n    Command:\r\n      sh\r\n      -c\r\n      while true; do date > /mnt/index.html; hostname >> /mnt/index.html; sleep $(($RANDOM % 5 + 5)); done\r\n    QoS Tier:\r\n      cpu:\tBurstable\r\n      memory:\tBestEffort\r\n    Requests:\r\n      cpu:\t\t100m\r\n    State:\t\tWaiting\r\n      Reason:\t\tContainerCreating\r\n    Ready:\t\tFalse\r\n    Restart Count:\t0\r\n    Environment Variables:\r\nConditions:\r\n  Type\t\tStatus\r\n  Ready \tFalse \r\nVolumes:\r\n  nfs:\r\n    Type:\tPersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)\r\n    ClaimName:\tnfs\r\n    ReadOnly:\tfalse\r\n  default-token-szz1v:\r\n    Type:\tSecret (a volume populated by a Secret)\r\n    SecretName:\tdefault-token-szz1v\r\nEvents:\r\n  FirstSeen\tLastSeen\tCount\tFrom\t\t\t\t\t\tSubobjectPath\tType\t\tReason\t\t\tMessage\r\n  ---------\t--------\t-----\t----\t\t\t\t\t\t-------------\t--------\t------\t\t\t-------\r\n  19m\t\t14m\t\t21\t{default-scheduler }\t\t\t\t\t\tWarning\t\tFailedScheduling\tPersistentVolumeClaim is not bound: \"nfs\"\r\n  13m\t\t13m\t\t4\t{default-scheduler }\t\t\t\t\t\tWarning\t\tFailedScheduling\tPersistentVolumeClaim 'default/nfs' is not in cache\r\n  13m\t\t13m\t\t1\t{default-scheduler }\t\t\t\t\t\tNormal\t\tScheduled\t\tSuccessfully assigned nfs-busybox-fu4el to gke-fieldphone-32335ca1-node-00f2\r\n  11m\t\t1m\t\t5\t{kubelet gke-fieldphone-32335ca1-node-00f2}\t\t\tWarning\t\tFailedMount\t\tUnable to mount volumes for pod \"nfs-busybox-fu4el_default(ce04b0d3-08ca-11e6-a6a8-42010af000bb)\": Mount failed: exit status 32\r\nMounting arguments: 10.19.247.137:/ /var/lib/kubelet/pods/ce04b0d3-08ca-11e6-a6a8-42010af000bb/volumes/kubernetes.io~nfs/nfs nfs []\r\nOutput: mount.nfs: Connection timed out\r\n\r\n\r\n  11m\t1m\t5\t{kubelet gke-fieldphone-32335ca1-node-00f2}\t\tWarning\tFailedSync\tError syncing pod, skipping: Mount failed: exit status 32\r\nMounting arguments: 10.19.247.137:/ /var/lib/kubelet/pods/ce04b0d3-08ca-11e6-a6a8-42010af000bb/volumes/kubernetes.io~nfs/nfs nfs []\r\nOutput: mount.nfs: Connection timed out\r\n```"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/214591505","html_url":"https://github.com/kubernetes/kubernetes/issues/24687#issuecomment-214591505","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24687","id":214591505,"user":{"login":"xidui","id":4591091,"avatar_url":"https://avatars.githubusercontent.com/u/4591091?v=3","gravatar_id":"","url":"https://api.github.com/users/xidui","html_url":"https://github.com/xidui","followers_url":"https://api.github.com/users/xidui/followers","following_url":"https://api.github.com/users/xidui/following{/other_user}","gists_url":"https://api.github.com/users/xidui/gists{/gist_id}","starred_url":"https://api.github.com/users/xidui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xidui/subscriptions","organizations_url":"https://api.github.com/users/xidui/orgs","repos_url":"https://api.github.com/users/xidui/repos","events_url":"https://api.github.com/users/xidui/events{/privacy}","received_events_url":"https://api.github.com/users/xidui/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T02:47:13Z","updated_at":"2016-04-26T02:47:13Z","body":"here is my output:\r\n```\r\n[root@kubernetes-master nfs]# kubectl get pod\r\nNAME                READY     STATUS              RESTARTS   AGE\r\nnfs-busybox-30a30   0/1       ContainerCreating   0          9m\r\nnfs-busybox-8dw8q   0/1       ContainerCreating   0          9m\r\nnfs-server-0e7rq    1/1       Running             0          4s\r\n```\r\n```\r\n[root@kubernetes-master nfs]# kubectl logs nfs-server-0e7rq\r\nServing /exports\r\nServing /\r\nrpcinfo: can't contact rpcbind: : RPC: Unable to receive; errno = Connection refused\r\nStarting rpcbind\r\nNFS started\r\n```\r\n```\r\n[root@kubernetes-master ~]# kubectl describe po nfs-busybox-8dw8q\r\nName:                           nfs-busybox-8dw8q\r\nNamespace:                      default\r\nImage(s):                       busybox\r\nNode:                           node-2-slave-1/107.170.32.151\r\nStart Time:                     Mon, 25 Apr 2016 22:29:56 -0400\r\nLabels:                         name=nfs-busybox\r\nStatus:                         Pending\r\nReason:\r\nMessage:\r\nIP:\r\nReplication Controllers:        nfs-busybox (2/2 replicas created)\r\nContainers:\r\n  busybox:\r\n    Container ID:\r\n    Image:              busybox\r\n    Image ID:\r\n    QoS Tier:\r\n      cpu:              BestEffort\r\n      memory:           BestEffort\r\n    State:              Waiting\r\n      Reason:           ContainerCreating\r\n    Ready:              False\r\n    Restart Count:      0\r\n    Environment Variables:\r\nConditions:\r\n  Type          Status\r\n  Ready         False\r\nVolumes:\r\n  nfs:\r\n    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)\r\n    ClaimName:  nfs\r\n    ReadOnly:   false\r\n  default-token-pjwpm:\r\n    Type:       Secret (a secret that should populate this volume)\r\n    SecretName: default-token-pjwpm\r\nEvents:\r\n  FirstSeen     LastSeen        Count   From                            SubobjectPath   Reason          Message\r\n  ─────────     ────────        ─────   ────                            ─────────────   ──────          ───────\r\n  16m           16m             1       {scheduler }                                    Scheduled       Successfully assigned nfs-busybox-8dw8q to node-2-slave-1\r\n  16m           6s              92      {kubelet node-2-slave-1}                        FailedMount     Unable to mount volumes for pod \"nfs-busybox-8dw8q_default            status 32\r\nMounting arguments: 10.254.207.116:/ /var/lib/kubelet/pods/bd8e9ba7-0b56-11e6-a2e5-0401cb31c801/volumes/kubernetes.io~nfs/nfs nfs []\r\nOutput: Job for rpc-statd.service failed because the control process exited with error code. See \"systemctl status rpc-statd.service\" and \"journalctl -xe\" for det\r\nmount.nfs: rpc.statd is not running but is required for remote locking.\r\nmount.nfs: Either use '-o nolock' to keep locks local, or start statd.\r\nmount.nfs: an incorrect mount option was specified\r\n\r\n\r\n  16m   6s      92      {kubelet node-2-slave-1}                FailedSync      Error syncing pod, skipping: Mount failed: exit status 32\r\nMounting arguments: 10.254.207.116:/ /var/lib/kubelet/pods/bd8e9ba7-0b56-11e6-a2e5-0401cb31c801/volumes/kubernetes.io~nfs/nfs nfs []\r\nOutput: Job for rpc-statd.service failed because the control process exited with error code. See \"systemctl status rpc-statd.service\" and \"journalctl -xe\" for det\r\nmount.nfs: rpc.statd is not running but is required for remote locking.\r\nmount.nfs: Either use '-o nolock' to keep locks local, or start statd.\r\nmount.nfs: an incorrect mount option was specified\r\n\r\n```"}}