We are using Traefik as a proxy for our Nomad cluster. Traefik is configured to read from Consul. Our Nomad jobs use service tags to configure Traefik.
Traefik Configuration
[serversTransport]
insecureSkipVerify = true
[metrics]
[metrics.prometheus]
[entryPoints]
//Seemingly irrelevant data
[entryPoints.rd15]
address = ":21115"
[entryPoints.rd16]
address = ":21116"
[entryPoints.rd16udp]
address = ":21116/udp"
[entryPoints.rd17]
address = ":21117"
[entryPoints.rd18]
address = ":21118"
[entryPoints.rd19]
address = ":21119"
[entryPoints.rd20udp]
address = ":21120/udp"
[entryPoints.rd8000]
address = ":8000"
[entryPoints.mongodb]
address = ":27017"
//Seemingly irrelevant data
# Enable Consul Catalog configuration backend.
[providers.consulCatalog]
prefix = "traefik"
exposedByDefault = false
[providers.consulCatalog.endpoint]
address = "192.168.7.210:8500"
scheme = "http"
[providers.file]
directory = "/traefik/providers/configs"
watch = true
Nomad Job Tags
"traefik.enable=true",
"traefik.tcp.routers.rustdesk-hbbs15.rule=(Host(`rd.sewcorp.com`))",
"traefik.tcp.routers.rustdesk-hbbs15.rule=HostSNI(`*`)",
"traefik.tcp.routers.rustdesk-hbbs15.service=rustdesk-hbbs15-service",
"traefik.tcp.routers.rustdesk-hbbs15.entryPoints=rd15",
"traefik.tcp.services.rustdesk-hbbs15-service.loadbalancer.server.port=${NOMAD_HOST_PORT_rd15}",
"traefik.tcp.routers.rustdesk-hbbs16.rule=(Host(`rd.sewcorp.com`))",
"traefik.tcp.routers.rustdesk-hbbs16.rule=HostSNI(`*`)",
"traefik.tcp.routers.rustdesk-hbbs16.service=rustdesk-hbbs16-service",
"traefik.tcp.routers.rustdesk-hbbs16.entryPoints=rd16",
"traefik.tcp.services.rustdesk-hbbs16-service.loadbalancer.server.port=${NOMAD_HOST_PORT_rd16}",
"traefik.tcp.routers.rustdesk-hbbs18.rule=(Host(`rd.sewcorp.com`))",
"traefik.tcp.routers.rustdesk-hbbs18.rule=HostSNI(`*`)",
"traefik.tcp.routers.rustdesk-hbbs18.service=rustdesk-hbbs18-service",
"traefik.tcp.routers.rustdesk-hbbs18.entryPoints=rd18",
"traefik.tcp.services.rustdesk-hbbs18-service.loadbalancer.server.port=${NOMAD_HOST_PORT_rd18}",
"traefik.udp.routers.rustdesk-hbbs-udp16.service=rustdesk-hbbs-udp16-service",
"traefik.udp.routers.rustdesk-hbbs-udp16.entryPoints=rd16udp",
"traefik.udp.services.rustdesk-hbbs-udp16-service.loadbalancer.server.port=${NOMAD_HOST_PORT_rd16}",
Consul Tags
rustdesk-hbbr1
traefik.enable=true
traefik.tcp.routers.rustdesk-hbbr17.rule=(Host(`rd.sewcorp.com`))
traefik.tcp.routers.rustdesk-hbbr17.rule=HostSNI(`*`)
traefik.tcp.routers.rustdesk-hbbr17.service=rustdesk-hbbr17-service
traefik.tcp.routers.rustdesk-hbbr17.entryPoints=rd17
traefik.tcp.services.rustdesk-hbbr17-service.loadbalancer.server.port=31871
traefik.tcp.routers.rustdesk-hbbr19.rule=(Host(`rd.sewcorp.com`))
traefik.tcp.routers.rustdesk-hbbr19.rule=HostSNI(`*`)
traefik.tcp.routers.rustdesk-hbbr19.service=rustdesk-hbbr19-service
traefik.tcp.routers.rustdesk-hbbr19.entryPoints=rd19
traefik.tcp.services.rustdesk-hbbr19-service.loadbalancer.server.port=26878
rustdesk-hbbs
traefik.udp.routers.rustdesk-hbbs-udp16.service=rustdesk-hbbs-udp16-service
traefik.udp.routers.rustdesk-hbbs-udp16.entryPoints=rd16udp
traefik.udp.services.rustdesk-hbbs-udp16-service.loadbalancer.server.port=28802
Traefik picks up the IP address without issue, but the port is always 0 for the rustdesk-hbbs-udp16-service
service.
What am I missing?