traefik/docs/configuration/backends/consul.md

62 lines
1.2 KiB
Markdown
Raw Normal View History

# Consul Key-Value Provider
2017-08-25 19:32:33 +00:00
2018-10-17 14:24:04 +00:00
Traefik can be configured to use Consul as a provider.
2017-08-25 19:32:33 +00:00
```toml
################################################################
# Consul KV Provider
2017-08-25 19:32:33 +00:00
################################################################
# Enable Consul KV Provider.
2017-08-25 19:32:33 +00:00
[consul]
2017-09-11 17:10:04 +00:00
# Consul server endpoint.
2017-08-25 19:32:33 +00:00
#
# Required
2017-09-11 17:10:04 +00:00
# Default: "127.0.0.1:8500"
2017-08-25 19:32:33 +00:00
#
endpoint = "127.0.0.1:8500"
2017-09-11 17:10:04 +00:00
# Enable watch Consul changes.
2017-08-25 19:32:33 +00:00
#
# Optional
2017-09-11 17:10:04 +00:00
# Default: true
2017-08-25 19:32:33 +00:00
#
watch = true
# Prefix used for KV store.
#
# Optional
2017-09-11 17:10:04 +00:00
# Default: traefik
2017-08-25 19:32:33 +00:00
#
prefix = "traefik"
2017-09-11 17:10:04 +00:00
# Override default configuration template.
# For advanced users :)
2017-08-25 19:32:33 +00:00
#
# Optional
#
# filename = "consul.tmpl"
2017-09-11 17:10:04 +00:00
# Use Consul user/pass authentication.
2017-08-25 19:32:33 +00:00
#
# Optional
#
2017-09-11 17:10:04 +00:00
# username = foo
# password = bar
# Enable Consul TLS connection.
#
# Optional
#
# [consul.tls]
# ca = "/etc/ssl/ca.crt"
# cert = "/etc/ssl/consul.crt"
# key = "/etc/ssl/consul.key"
2018-04-06 07:38:03 +00:00
# insecureSkipVerify = true
2017-08-25 19:32:33 +00:00
```
To enable constraints see [provider-specific constraints section](/configuration/commons/#provider-specific).
2017-09-11 17:10:04 +00:00
Please refer to the [Key Value storage structure](/user-guide/kv-config/#key-value-storage-structure) section to get documentation on Traefik KV structure.