Self-Hosted JupyterHub on MicroK8s with NFS Storage

I manage JupyterHub on a self-hosted Kubernetes cluster using MicroK8s and NFS for persistent storage. The setup is causing problems now, which prompted me to re-deploy everything. I set up the cluster over 18 months ago and was using version 2.0.0 of the helm chart which had a section for self-hosting with microk8s in the official documentation. I got aware that the official Zero to JupyterHub guide is tailored more towards managed Kubernetes services now and that self-hosted setups are not officially supported anymore.

I believe there might members of this community who have successfully implemented similar deployments and faced issues like I am.

I wanted to know if there is some place where self-hosting latest version of Jupyterhub helm chart is documented with problems and challenges etc.

Is it still feasible to self-host Jupyterhub or one should only use managed Kubernetes services?

Z2JH works fine on a correctly configured K8s cluster. For example, our CI uses K3s

and I’ve deployed Z2JH and BinderHub on multiple K3s clusters.

The reason we say it’s “not officially supported” is that there are an infinite number of ways to deploy and configure your own K8s cluster, and it’s not practical to debug complicated low-level Kubernetes problems, nor is it possible to maintain instructions for the many self-hosted K8s distributions. We used to have microk8s instructions but we removed them because they no longer worked, and other K8s distributions became available.

The main benefit of developing and deploying applications on Kubernetes is that you assume the platform is already deployed and functioning correctly, so you can focus on the application. Z2JH assumes you provide the cluster (whether it’s managed by someone else, or self-hosted), and Z2JH takes care of deploying JupyterHub.

For example, in your other post it sounds like you’ve got a K8s or NFS problem that’s not related to the Z2JH configuration, which may be specific to microk8s, your NFS server, or both.

In summary self-hosted K8s definitely works, but it’s your responsibility to correctly setup K8s and the supporting physical/virtual hardware like storage, networking, etc.