apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: jupyterhub-ingress
  namespace: jupyterhub
  annotations:
    nginx.ingress.kubernetes.io/backend-protocol: HTTP
    nginx.ingress.kubernetes.io/rewrite-target: /jupyterhub/$2
    nginx.ingress.kubernetes.io/use-regex: 'true'
spec:
  ingressClassName: nginx
  rules:
    - host: cnoe.localtest.me
      http:
        paths:
          - path: /jupyterhub(/|$)(.*)
            pathType: ImplementationSpecific
            backend:
              service:
                name: proxy-public
                port:
                  number: 80
    - host: localhost
      http:
        paths:
          - path: /jupyterhub(/|$)(.*)
            pathType: ImplementationSpecific
            backend:
              service:
                name: proxy-public
                port:
                  number: 80
