Jupyterhub on Kubernets NFS error - pod has unbound immediate PersistentVolumeClaims

7/2/2019

I created pv/pvc for existing nfs server and launched jhub, but it failed to start a server and got an error. Since I already have existing NFS server, I followed "Additional storage volumes" from https://zero-to-jupyterhub.readthedocs.io/en/latest/user-storage.html.

[Warning] pod has unbound immediate PersistentVolumeClaims (repeated 4 times)

PV yaml

apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv0001
spec:
  capacity:
    storage: 30Gi
  accessModes:
  - ReadWriteMany
  nfs:
    path: /mnt/nfs
    server: 192.168.5.67
  persistentVolumeReclaimPolicy: Retain

PVC yaml

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: nfs-claim1
  namespace: jhub
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 10Gi

PV and PVC looks fine for me.

NAME     CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM             STORAGECLASS   REASON   AGE
pv0001   30Gi       RWX            Retain           Bound    jhub/nfs-claim1                           58m
NAME         STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS   AGE
claim-gp4r   Pending                                                     4m32s
nfs-claim1   Bound     pv0001   30Gi       RWX                           58m

jupyterhub conf.yaml

proxy:
  secretToken: "7891e9825fde46bee0ac2de2961a256909a7233c68b5893d863c3122168332e3"

hub:
  db:
    type: sqlite-memory

singleuser:
  image:
    name: jupyter/minimal-notebook
    tag: 2343e33dec46
  profileList:
    - display_name: "Minimal environment"
      description: "To avoid too much bells and whistles: Python."
      default: true
  storage:
    extraVolumes:
      - name: jupyterhub-shared
        persistentVolumeClaim:
          claimName: nfs-claim1
    extraVolumeMounts:
      - name: jupyterhub-shared
        mountPath: "/mnt/jovyan/shared"

I would appreciate any advice to fix this issue.

-- Mike
jupyter
jupyterhub
kubernetes
openstack

0 Answers