Traefik and Consul Catalog Provider issue

Traefik version: 2.2.5
Purpose: to use consul catalog provider to route traffic

I have configured traefik with cli args. I added consul to coredns.
Here are my traefik configs in the deployment:


In the dashboard, it does detect all 3 providers. I also able to successfully DIG/connect to the consul.service.consul:8500.

With my application deployment, i added annotations and use traefik.enable: “true” , but the dashboard does not pick up the catalog routes and services. I also tried to set SERVICE_TAG environment variable in place of the annotations and that also did not work. Why are the annotations not working?

Also originally, i have configured --providers.consulcatalog.exposedbydefault=true (default) and the dashboard does pick up the all the apps with the consul sidecars automatically but the annotations when i add route rules and entrypoints do not make any effect and testing the routes do not work and we suspect that the annotations are not working at all. Also, i tried using tomel file instead of cli and the results are the same. How can our apps get detected into traefik and where and how do you specify the host? Can the host name be of any? Example:

Any solutions?


Same problem here, did you get any resolution?

Services show up just fine but can’t seem to route correctly to them.

Hi @zerozerocoo,

How are you setting the tags on your application?

They should be set using the annotation. For example:

annotations: "true" "traefik.enable=true,,\"\")"

This configuration works in my test environment to register a service in Traefik.