Mount a GCS bucket into newly spawned notebook using s3fs

Hello All!

I’m pretty new to k8s, docker and jupyter hub so may be a trivial solution to what I’m having difficult time with…

My aim is to mount Google Cloud Storage bucket into a new spawned jupyter notebook.

I use s3fs to accomplish that (Google Cloud Storage · s3fs-fuse/s3fs-fuse Wiki · GitHub).

So when I try to run the following snippet:

echo "access-key:secret-key" > /home/jovyan/.passwd-s3fs
chmod 400 /home/jovyan/.passwd-s3fs
mkdir mount_point
chmod 600 mount_point
s3fs "my-gcs-bucket" "mount_point" -o passwd_file="/home/jovyan/.passwd-s3fs" -o nomultipart -o sigv2 -o url="https://storage.googleapis.com"

I get:

fuse: device not found, try 'modprobe fuse' first

By searching a bit in google I found this:

so I tried changing the security context but I still got the same result.

My question is:
How can I mount a given GCS bucket into a newly spawned notebook?

Many thanks in advance!

Have you managed to mount the bucket into a container when running it directly outside Kubernetes (ignoring JupyterHub completely)?

have not tried it on my pc (mac OS - since it required some settings adjustments that I did not follow), but I did managed to mount it via other docker container in kubernetes (using the same command mentioned above). In order to accomplish that I had to add the securityContext.privileged: true seetings into the manifest + I know the container is ran as root user.

Please could you show us your Z2JH configuration with secrets redacted, and tell us which version you’re using? Thanks!