Centralized Storage for JupyterHub Users on Kubernetes

Hello everyone,

I have deployed JupyterHub on my Kubernetes cluster, and it’s working well. However, I noticed that it creates a separate PersistentVolumeClaim (PVC) for each user who logs in to the Jupyter notebook.

this is what i have installed

While this setup works, I would prefer a more centralized storage solution where either:

  1. A single, shared PVC is used for all users instead of creating one for each user.
  2. Alternatively, a solution where user data can be stored in a database like PostgreSQL instead of using PVCs.

Has anyone implemented a similar setup or can suggest best practices to achieve this?

Thanks in advance for your help!

You could disable dynamic user storage, and instead mount a subpath of a single volume:

Your Kubernetes Storage Controller needs to support mounting a single volume to multiple pods, not all controllers do.

See for example