how to use jupyter-server-proxy with a Z2JH deployment

I have installed the jupyterhub on Kubernetes on GKE by following the guide.

I am running various services on the notebook like Tensorboard and Spark UI. These services are running on port inside the pods. And of course, these ports are not reachable from my hub IP.

I tried to use jupyter-server-proxy for the same. I did the below steps. I opened the terminal and ran below steps

1. mkdir www
2. cd www
3. echo "hi" >> index.html
4. python -m http.server 9000

Screenshot 2020-09-04 at 5 09 57 PM

Now I went to this URL - http://my-hub-ip/user/my-user-name/proxy/9000/

I got a 404 error. Any suggestions on how should I fix it. I have verified that jupyter_server_proxy is enabled.

I have noticed one thing that whenever I try to access http://my-hub-ip/user/my-user-name/proxy/9000/ my browser automatically redirects me to http://my-hub-ip/user/my-user-name/proxy/9000

Welcome to the forum!

Please could you show us how you created the singleuser environment, for example could you link to the Dockerfile?

Hi @manics,

I am using jupyter/datascience-notebook image and this is the Dockerfile

https://github.com/jupyter/docker-stacks/blob/6d42503c684f3de9b17ce92a6b0c952ef2d1ecd8/datascience-notebook/Dockerfile

You’ll need to build your own image that includes jupyter-server-proxy.

Hi,

yes I have fixed it. I was using the wrong image.