I installed Jupyterhub in my K3S instance using Helm. My goal is to enable user subdomains as https://jupyterhub.readthedocs.io/en/3.0.0/reference/websecurity.html#enable-subdomains suggests.
I used the below configuration, to link the Jupyterhub instance through ingress and ensure tls encryption with a basic certificate for the base URL and a wildcard certificate for the user subdomains.
WIthout user subdomains enabled this works fine.
After logging in the user is directed to “https://base-url.example.com/user/testuser/lab?”
ingress: enabled: true hosts: - "base-url.example.com" - "*.base-url.example.com" tls: - hosts: - "base-url.example.com" secretName: simple-tls-secret - hosts: - "*.base-url.example.com" secretName: wildcard-tls-secret proxy: service: type: ClusterIP # Configuration for User Subdomaining # hub: # extraConfig: # myConfig.py: # c.JupyterHub.subdomain_host="https://base-url.example.com"
When I enable the commented out configuration however my Jupyterhub instance starts to behave badly.
After login the user is directed to “https://testuser.base-url.example.com/hub/user/testuser/lab” and gets displayed a “500: Internal server error redirect loop detected.”
The hub pod logs show several times in succession:
[timestamp] 302 GET /hub/user/testuser/labs? -> https://testuser.base-url.example.com/user/testuser/lab? [timestamp] 302 GET /user/testuser/lab? -> /hub/user/testuser/labs?
until finally it shows:
[timestamp] 500 GET /hub/user/testuser/lab? : Redirect loop detected.
and closes the connection.
I am guessing that the redirect has an error and should usually strip:
or something like this. Or maybe it is something else entirely. Does anyone have any ideas?