Skip to content

Traefik & Consul Catalog

A Story of Tags, Services & Instances

Consul Catalog

Attach tags to your services and let Traefik do the rest!

Configuration Examples

Configuring Consul Catalog & Deploying / Exposing Services

Enabling the consul catalog provider

providers:
  consulCatalog: {}
[providers.consulCatalog]
--providers.consulcatalog=true

Attaching tags to services

- traefik.http.routers.my-router.rule=Host(`example.com`)

Routing Configuration

See the dedicated section in routing.

Provider Configuration

refreshInterval

Optional, Default=15s

Defines the polling interval.

providers:
  consulCatalog:
    refreshInterval: 30s
    # ...
[providers.consulCatalog]
  refreshInterval = "30s"
  # ...
--providers.consulcatalog.refreshInterval=30s
# ...

prefix

required, Default="traefik"

The prefix for Consul Catalog tags defining Traefik labels.

providers:
  consulCatalog:
    prefix: test
    # ...
[providers.consulCatalog]
  prefix = "test"
  # ...
--providers.consulcatalog.prefix=test
# ...