Ingress rules for one server

I know on the ingress rules pages I see examples like this:
ingress:

  • hostname: gitlab.widgetcorp.tech
    service: http://localhost:80
  • hostname: gitlab-ssh.widgetcorp.tech
    service: ssh://localhost:22
  • service: http_status:404

What if I have a server that hosts a web site that I want access to using ssh? Can I do something like this? Overlapping hostnames.
ingress:

  • hostname: gitlab.widgetcorp.tech
    service: http://localhost:80
  • hostname: gitlab.widgetcorp.tech
    service: ssh://localhost:22
  • service: http_status:404

Sorry, but that won’t work. Those are endpoints. The tunnel will let you out at the wrong place. That’s why I create a ‘ssh’ subdomain. It’d be the same CNAME target as the site.

2 Likes