Giving users a dedicated /tmp disk with Kubernetes ephemeral volumes

We recently figured out a simple way to give individual users their own /tmp folder so that they have more space in a cost-effective way.
/tmp is often used for storing intermediate data files and processing steps, but a few communities like MAAP and EarthScope were running into size limits.
We could always increase the total size of the disk, but this increases a steady-state cost, ååwhich is overkill for something that is inherently ephemeral.
By using dedicated, temporary storage for the /tmp folder, we can make it more cost-effective to dynamically grow (and shrink) the space available to users.

/tmp disk on the MAAP staging hub.
This builds on top of the ephemeral volumes feature of Kubernetes, which our team recently discovered! These attach a cloud disk to a single user’s server, and Kubernetes deletes the disk when the server stops.
We built on the JupyterHub Fancy Profiles project to add a dropdown for users to pick a dedicated /tmp disk and how big they want it to be (see ths PR to learn more: 2i2c-org/infrastructure#9112).
Learn more #
Thanks for reading! If you'd like to follow our work, join our mailing list or subscribe to our blog. You can read our community hub documentation or learn about membership.