I am new to Jupyterhub space and i am working on a usecase of deploying jupyterhub on an AKS Cluster.
i want to open jupyterhub when i try to access domain-name.com/nap. For making this happen, I installed nginx ingress in AKS cluster and routed /nap to proxy-public:80. In config.yaml file, I added hub.baseUrl: /nap. I checked the svc logs and browser devTools and found out that the request is not triggering /hub or /hub/spawn.
While installing the helm chart, i am setting a page.html file as set file in b64 encoding format as this file is needed while startup (this file is being called in hub.extrafiles.page_html).
Am i missing updating /nap in any other place as well? or could it be due to html file which i am setting.
i have already added the hub.baseurl: /nap. Are there any other places i need to change? or are there any direct changes i have to do in other resources.
In the Z2JH Helm chart you should only set hub.baseUrl, you shouldnât configure the base URL anywhere else. Since youâre using an ingress you should set ingress.enabledand a class name or annotations instead of creating it yourself.
If youâre still having problems can you share your full Z2JH configuration, including any customisations or extra K8S resources that youâve created?
Thanks for the input, Sorry. I am afraid i cannot share the config here as it is company proprietory. Please let me know if u want to look into any specific section, i can help u accordingly Also, i am trying to create the ingress section in config and getting the error:
error:
Error: UPGRADE FAILED: failed to create resource: Ingress.networking.k8s.io âjupyterhubâ is invalid: spec.rules[0].host: Invalid value: âmap[host:app-nap.domain.com paths:[map[path:/nap pathType:Prefix]]]â: a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, â-â or â.â, and must start and end with an alphanumeric character (e.g. âexample.comâ, regex used for validation is â[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*â)
Thanks a lot @manics , your inputs helped a lot but i am facing another issue.
so basically, from a high level view - when using launch jupyterhub from iframe, it basically triggers the domain.com/logout first and then autologins using /login endpoint and re-directs to /hub and /hub/spawn because of the settings we maintain in Configuration. This is the case it is working fine without any path-based routing.
But due to /nap endpoint routing, the redirection from /logout is not going to /login and getting stuck in endless loop.
It is not redirecting the way it has to. Can you please help?
It sounds like itâs something to do with your customisations. Can you share your JupyterHub logs? Can you also try removing all customisations so youâre running a plain Z2JH but with your baseurl, then work out which of your customisations breaks things?
As i already mentioned, we are using jupyterhub from iframe. So, from our main application when we click on project name - it auto-logins to iframe JH due to auto_login enabled.
So, i was checking the hubâs logs and found the following logs whenever i am trying to click on project in source application:
I also have another aks cluster where the JH is working with baseUrl as \ and it doesnât have this error. (screenshot in next comment)
Please let me know if we are searching for a specific error log, i can ping that as well.
Edit: Forgot to mention, if i give domain-name.com/nap/hub i can see the jupyterhub server starting but it doesnât start if triggering as iframe from source app.