Exposing jupyterhub service with dns name

I have a jupyterhub service running on kubernetes. I have exposed the service via an internal Load balancer currently which exposes an ip address. I want to expose the service using a dns name (xyz.domain.com).
I refered to these docs that say to use ExternalName service type. However when I use the service type as ExternalName and pass externalName: xyz.domain.com. I get the error
“proxy.service: Additional property externalName is not allowed”.
Do you know what I might be missing?

Helm-chart version : 2.0.0
Helm version: 3.10

From the k8s docs:

Services of type ExternalName map a Service to a DNS name, not to a typical selector such as my-service or cassandra. You specify these Services with the spec.externalName parameter.

This is so you can refer to an external service from inside your K8s cluster using the internal k8s service name. It’s not for exposing your k8s service.

You’ll probably need to configure a loadbalancer or use an ingress, depending on your k8s cluster. If you need more help please share your full Z2JH config, along with details of how your K8s cluster is setup and managed.

Hey @manics . Thank you for looking at my question. I have an internal load Balancer setup. This is what we are passing

      type: LoadBalancer
      labels: {}
      annotations: {
                "meta.helm.sh/release-name": 'jupyterhub',
                "meta.helm.sh/release-namespace": 'canvas',
                "networking.gke.io/load-balancer-type": 'Internal',
      disableHttpPort: false
      extraPorts: []
      loadBalancerSourceRanges: []

this exposes an external ip that we use to navigate to the cluster. I am looking for a way to use a dns name over it. Any pointers on how to do that?

1 Like

If you’ve already got an external IP attached to your load balancer you need to the domain name to the IP on your DNS server, this is separate from K8s.