Binder server URL/GKE

I am not too familiar with what is occurring in the background of Binder/JupyterHub, hopefully this topic is in the correct section.

I previously created a Binder for my students to use for distanced learning. The notebooks contain links to specific pre-loaded workspaces that have been modified to include the JUPYTERHUB_USER value (via the postBuild script):

[Load example workspace]($JUPYTERHUB_USER/lab/workspaces/example)

These were sufficient, but presumably now has access to additional clusters and so the GKE number is not always consistent (hub.gke.mybinder; hub.gke1.mybinder; hub.gke2.mybinder).

Is there any way to access this value (gke/gke1/gke2) when launching the server such that the base URL could be updated in the start/postBuild scripts as well?

Hi @Telorast
Is your notebook or documentation public? There might be other ways to obtain a generic URL.

Yes, they are public. The notebook/course files are hosted on GitLab.

Any chance you could provide a link to them?

Sure: example repo (Binder badge in the readme)

I largely followed the instructions from here initially, but have not been successful in working out how to modify the URL.

Have you tried using a link without the host?

[Go to the Day 1 workspace](/user/$JUPYTERHUB_USER/lab/workspaces/day$day)


That works perfectly for this use case, thanks!