Skip to main content
Version 3.0.0

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

  1. 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}'
  2. Add the hostname to DNS or to the /etc/hosts file:
    <INGRESS_IP>   jupyter.tdp.local
  3. Access http://jupyter.tdp.local (or https:// if TLS is configured).

Troubleshooting

ProblemCauseSolution
Ingress not createdTDPConfiguration.gateway.ingress.enabled: false or incorrect ingressClassNameCheck both settings
Host not resolvingDNS or /etc/hosts not configuredFix name resolution on the client
502 Bad GatewayJupyterHub pod not readyCheck kubectl get pods -n <namespace>