Traefik 2.5.0 load balancer with Consul Connect


I have been trying out the new Traefik 2.5.0-rc3 release which is adding support for routing to connect enabled services (Add suport for Consul Connect by Gufran · Pull Request #6373 · traefik/traefik · GitHub) and (Release v2.5.0-rc3 · traefik/traefik · GitHub). My test setup is similar to the (Load Balancing with Traefik | Nomad - HashiCorp Learn) example and (connect Stanza - Job Specification | Nomad by HashiCorp) using-sidecar-service example except I am attempting to use the new consul connect functionality instead of sidecar services.

I understand that this is all still release candidate and has not been released yet so this is me purely testing this functionality out to see how it would work with Nomad and Consul as a service load balancer. I’m also not sure if this is the right place to post this as it may apply to Consul specifically and not Nomad.

In either case I have a job template which has a group service stanza:

    network {
      mode = "bridge"

      port "http" {
        static = "80"
        to = "80"

    service {
      name = "internal-proxy"
      port = "${NOMAD_PORT_http}"
      task = "traefik"

      connect {
        native = true

    task "traefik" {
      driver = "docker"

      config {
        image = "traefik:v2.5.0-rc3"

        ports = ["http"]

With this I am able to route traffic to my application on the service mesh and I can access it by going through Traefik. This also registers the internal-proxy service as expected inside of Consul when this job is deployed. It does not however show that its in the service mesh or any upstream/downstream proxies in the consul topology view like it would when defining a sidecar_service stanza with upstreams. This may make sense as they are not defined within the job file and instead are picked up by the consulcatalog provider in Traefik using the tags defined in other services.

My main question is is this actually supported thing right now or does it require new functionality to be implemented in Nomad/Consul for this use case? or does Traefik have more it needs to do for its implementation? or have I even got this test implementation correct in the first place?


Hi @CarbonCollins,

I believe this will require changes in Consul in order to display metrics from a given service when it does not have any explicit downstream dependencies.

A GitHub issue was filed yesterday about this Topology view should show service as soon as a sidecar exists · Issue #10720 · hashicorp/consul · GitHub. I’ll provide an update on the issue and this post after discussing this with our engineering team.

I’ll keep track of that issue in the meantime then!

Thanks for the help