Ingress - JupyterHub
Exposing JupyterHub via Ingress enables external access to the web interface using a dedicated hostname.
Ingress vs Gateway API
TDPConfiguration.gateway.ingress and TDPConfiguration.gateway.gatewayApi are mutually exclusive. Enable only one of them.
Prerequisites
- Ingress Controller installed in the cluster (e.g. NGINX).
- Hostname configured in DNS or in
/etc/hosts. - TLS is optional.
Configuration example
TDPConfiguration:
gateway:
ingress:
enabled: true
ingress:
ingressClassName: <ingress-class>
hosts:
- host: jupyter.tdp.local
paths:
- path: /
pathType: Prefix
tls: []
Replace <ingress-class> with the Ingress Controller name in your environment (check with kubectl get ingressclass).
Access
- Get the external IP of the Ingress Controller:
Terminal input
kubectl get svc -A -l app.kubernetes.io/name=ingress-nginx \
-o jsonpath='{.items[0].status.loadBalancer.ingress[0].ip}' - Add the hostname to DNS or to the
/etc/hostsfile:<INGRESS_IP> jupyter.tdp.local - Access
http://jupyter.tdp.local(orhttps://if TLS is configured).
Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
| Ingress not created | TDPConfiguration.gateway.ingress.enabled: false or incorrect ingressClassName | Check both settings |
| Host not resolving | DNS or /etc/hosts not configured | Fix name resolution on the client |
| 502 Bad Gateway | JupyterHub pod not ready | Check kubectl get pods -n <namespace> |