How to use my own hub image when deploying a jupyterhub on google kubernetes engine?

4/30/2019

I'm trying to deploy JupyterHub on Google Kubernetes engine.
I managed to deploy it by following the Zero to JupyterHub with Kubernetes tutorial.
My next step is to deploy JupyterHub using my own hub image but I keep getting an error message (from the proxy apparently).

So I created a repository on Docker Hub registry and tried to modify my helm config file so it will pull the image (I used the helm Configuration Reference).

I updated the deploy with the following command:

helm upgrade --install $RELEASE jupyterhub/jupyterhub --namespace $NAMESPACE --version=0.8.2 --values config.yaml 

As a result, I get a "Service Unavailable" message (The pods are all running).

The proxy pod log:

09:14:24.370 - info: [ConfigProxy] Adding route / -> http://10.47.249.21:8081 09:14:24.380 - info: [ConfigProxy] Proxying http://0.0.0.0:8000 to http://10.47.249.21:8081
09:14:24.381 - info: [ConfigProxy] Proxy API at http://0.0.0.0:8001/api/routes 09:16:01.434 - error: [ConfigProxy] 503 GET /hub/admin connect ECONNREFUSED 10.47.249.21:8081 09:16:01.438 - error: [ConfigProxy] Failed to get custom error page Error: connect ECONNREFUSED 10.47.249.21:8081
at Object.exports._errnoException (util.js:1020:11)
at exports._exceptionWithHostPort (util.js:1043:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14)

Hub image Dockerfile:

FROM jupyterhub/jupyterhub:0.9.6

USER root

COPY MZ_logo.jpg /usr/local/share/jupyter/hub/static/images/MZ-logo.jpg

USER ${NB_USER}

Helm config.yaml file:

proxy:
  secretToken: "<TOKEN>"

auth:
  admin:
    users:
      - admin1
      - admin2

  whitelist:
    users:
      - user1
      - user2

hub:
  imagePullPolicy: 'Always'

  imagePullSecret:
    enabled: true
    username: <DOCKER_HUB_USERNAME>
    password: <DOCKER_HUB_PASSWORD>

  image:
    name: <DOCKER_HUB_USERNAME>/<DOCKER_HUB_REPO>
    tag: latest

  extraConfig: |
    c.JupyterHub.logo_file = '/usr/local/share/jupyter/hub/static/images/MZ-logo.jpg'
-- MaterialZ
google-kubernetes-engine
jupyterhub
kubernetes
kubernetes-helm

0 Answers