Stuck with redirect Loop when spawning with Kubespawner

Hi all,
I’m using an external proxy (CHP) and trying to spawn a single user JupyterLab from my JupyterHub.
I have:
3 services (hub:8081 proxy-public:8000/443 and proxy-api 8001)
1 Ingress that resolves the url http://somedns/jupyteranis to port 8000 of the proxy-public

my config is like:
c.ConfigurableHTTPProxy.api_url=proxy-api host and port
c.JupyterHub.ip = proxy-public service host
c.JupyterHub.port = proxy-public service port

c.JupyterHub.hup_ip = ‘0.0.0.0’

c.JupyterHub.hub_connect_url = <don’t know what to put here>
I guess this is the url given to the spawned pod in order to contact back the Hub

c.JupyterHub.base_url = ‘/jupyteranis/’

Can you please help setting this ?
Cheers,
Anis

hub_connect_url (or hub_connect_ip) should be the hostname of the hub pod or service. In the default configuration of the zero-to-jupyterhub helm chart, the service is called hub, so

c.JupyterHub.hub_connect_ip = 'hub'
# or
c.JupyterHub.hub_connect_url = 'http://hub:8081'

I could circumvent more precisely the issue:
The KubeSpawner could create the pod, but could not get the Jupyter server version.

The pod is a basic jupyter notebook image.

If I run curl on the pod like:
Http://ip:8888/lab?token=…
It works

But I suppose JupyterHub is not hitting the right base_url
How can I modify that ? Which address is the Jupiter hub interrogating in order to get the Jupiter server version ?

Thanks

Make sure the command to start the user pod is jupyterhub-singleuser. It should not need to take any CLI arguments. This is how the base URL is set, from $JUPYTERHUB_SERVICE_URL.

Which address is the Jupiter hub interrogating in order to get the Jupiter server version ?

It requests /user/:name:/api