I am trying to deploy jupyterhub via helm chart on EKS. In our organization, our devops guys have set up nginx ingress controller so we usually use ingress for a service like this to get a relative path
If you want to run JupyterHub under a prefix you should set
hub:
baseUrl: /jupyter
in your config instead. This will configure JupyterHub to run under that prefix, and the Helm Chart will automatically add that to the ingress configuration, you shouldn’t need to specify pathSuffix. I thought this was in the Z2JH docs but I can’t find it
While setting up ingress for normal API’s in our cluster setup, we do not provide host parameter as show in my post.
An example of how the service ingress look like in our cluster
$ kubectl get ingress service-api -n analysis-dev -o wide
NAME HOSTS ADDRESS PORTS AGE
service-api * 172.xx.81.xx 80 218d
On setting
hosts:
- “”
I get
$ kubectl get ingress -n jupyterhub-dev
NAME HOSTS ADDRESS PORTS AGE
jupyterhub * 172.xx.81.xx 80 94m
So the hosts is similar to other ingress resources running in our cluster .i.e a wildcard
In the jupyterhub config, I tried setting up
hosts:
- “a.b.c.com”
hub:
baseUrl: /jupyter
but this caused 404 error in other running API’s
Next, I tried
hosts:
- “a.b.c.com/jupyter”
hub:
baseUrl: /
But this gave error
spec.rules[0].host: Invalid value: "https://a.b.c.com": a DNS-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])?)*')
We finally managed to fix the issue. I just want to give an update here.
The problem was with our network policy. We had to explicitly allow ingress to port 8000. Now it is working fine