Skip to content

JupyterHub

Alexander Diemand edited this page Feb 28, 2025 · 1 revision

JupyterHub

homepage

Setup on Kubernetes: documentation

helm preparation

helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/
helm repo update

override default settings

helm show values jupyterhub/jupyterhub > overrides.yaml

edits in overrides.yaml:

  • disabled "cull" of inactive instances
  cull:
    enabled: false
  • set NFS storage class for user's home; also capacity to 2 GB
      capacity: 2Gi
      homeMountPath: /home/jovyan
      dynamic:
        storageClass: "nfs-data-storage"
  • persistent storage for sqlite db (1 GB):
  db:
    pvc:
      storage: 1Gi
      storageClassName: jhub-local
  • provide persistent volume:
apiVersion: v1
kind: PersistentVolume
metadata:
  name: jhub-sqlite-pv
spec:
  storageClassName: jhub-local
  capacity:
    storage: "1Gi"
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Delete
  hostPath:
    path: /mnt/jhub-sqlite-storage
    # on the target node change ownership:
    # chown 1000:1000 /mnt/jhub-sqlite-storage

installation and upgrade

export NAMESPACE=jupyterhub
helm upgrade --cleanup-on-fail --install hub-jupyter jupyterhub/jupyterhub --namespace ${NAMESPACE} --create-namespace --values overrides.yaml

access JupyterHub

check service:

kubectl get services -n ${NAMESPACE}

port forward:

kubectl -n ${NAMESPACE} port-forward svc/proxy-public 18080:80

and then, access it in your browser at http://localhost:18080/