2

When running the following command:

helm upgrade --cleanup-on-fail \
    -- install $releaseName $dockerHubName/$dockerHubRepo:$tag \
    -- namespace $namespace \
    -- create-namespace \
    -- values config.yaml

I get the following error:

Error: Failed to download "$dockerHubName/$dockerHubRepo"

I've also tried with different tags, with semantic versioning (tag="1.0.0") and there's a image with the tag "latest" on the DockerHub repo (which is Public)

This also works with the base JuPyTerHub image jupyterhub/jupyterhub

flying_loaf_3
  • 397
  • 2
  • 3
  • 12
  • 1
    Usually Docker Hub holds Docker images, but `helm install` wants to install Helm charts; those are different things. Do you have a more specific example, including your own chart, without variables, that fails? – David Maze Jan 18 '22 at 01:57
  • Unfortunately not, I have built a Docker Image hosted on DockerHub and am trying to get that to run as the SingleUser server image using JuPyTerHub for Kubernetes - any idea how to get JuPyTerHub for Kubernetes to use a custom Docker image instead of the default jupyterhub/jupyterhub image? – flying_loaf_3 Jan 18 '22 at 02:07
  • 1
    You'd need to include that as the `image:` in one of your Kubernetes manifests, in something like a `templates/deployment.yaml` file inside the Helm chart. You can't directly `helm install` it. – David Maze Jan 18 '22 at 02:09
  • You can use this solution from [JupiterHub site](https://zero-to-jupyterhub.readthedocs.io/en/latest/jupyterhub/customizing/user-environment.html#choose-and-use-an-existing-docker-image) to use other Docker image. – Andrew Skorkin Jan 18 '22 at 17:07
  • @AndrewSkorkin Thanks for posting that, I found that exact site and used that in my solution. If you want, post an answer and I'll accept it! – flying_loaf_3 Jan 18 '22 at 22:48

1 Answers1

2

Based on information from the jupyterhub for kubernetes site, to use a different image from jupyter/docker-stacks, the following steps are required:

  1. Modify your config.yaml file to specify the image. For example:
     singleuser:
       image:
         # You should replace the "latest" tag with a fixed version from:
         # https://hub.docker.com/r/jupyter/datascience-notebook/tags/
         # Inspect the Dockerfile at:
         # https://github.com/jupyter/docker-stacks/tree/HEAD/datascience-notebook/Dockerfile
         name: jupyter/datascience-notebook
         tag: latest
  1. Apply the changes by following the directions listed in apply the changes.

If you have configured prePuller.hook.enabled, all the nodes in your cluster will pull the image before the hub is upgraded to let users use the image. The image pulling may take several minutes to complete, depending on the size of the image.

  1. Restart your server from JupyterHub control panel if you are already logged in.
Andrew Skorkin
  • 1,147
  • 3
  • 11