Consul Key-Value Provider

Traefik can be configured to use Consul as a provider.

  1. ################################################################
  2. # Consul KV Provider
  3. ################################################################
  4. # Enable Consul KV Provider.
  5. [consul]
  6. # Consul server endpoint.
  7. #
  8. # Required
  9. # Default: "127.0.0.1:8500"
  10. #
  11. endpoint = "127.0.0.1:8500"
  12. # Enable watch Consul changes.
  13. #
  14. # Optional
  15. # Default: true
  16. #
  17. watch = true
  18. # Prefix used for KV store.
  19. #
  20. # Optional
  21. # Default: traefik
  22. #
  23. prefix = "traefik"
  24. # Override default configuration template.
  25. # For advanced users :)
  26. #
  27. # Optional
  28. #
  29. # filename = "consul.tmpl"
  30. # Use Consul user/pass authentication.
  31. #
  32. # Optional
  33. #
  34. # username = foo
  35. # password = bar
  36. # Enable Consul TLS connection.
  37. #
  38. # Optional
  39. #
  40. # [consul.tls]
  41. # ca = "/etc/ssl/ca.crt"
  42. # cert = "/etc/ssl/consul.crt"
  43. # key = "/etc/ssl/consul.key"
  44. # insecureSkipVerify = true

To enable constraints see provider-specific constraints section.

Please refer to the Key Value storage structure section to get documentation on Traefik KV structure.