Traefik: 2.10.1
Nomad: v1.5.6+ent
Consul: v1.15.2+ent
We are experiencing 502 errors during deployments and we've tried few configurations for the Nomad Jobs and Traefik.
Enabling "watch: true" seems to solve the issue, however when it is enabled, it causes a massive spike on CPU usage on the Consul Leader server.
Trying "refreshInterval: 1" seems to hugely improve the issue without causing problems on Consul but some 502's still occur.
[I've got some input from a forum entry before opening my own: Traefik V2 and ConsulCatalog]
I would appreciate your input/help.
An example of the configuration in use for Traefik
api:
dashboard: true
insecure: true
entrypoints:
https:
address: "0.0.0.0:<PORT_NUMBER>"
metrics:
address: "0.0.0.0:<PORT_NUMBER>"
traefik:
address: "0.0.0.0:<PORT_NUMBER>"
log:
level: DEBUG
format: json
accessLog:
format: json
filePath: "/dev/stdout"
fields:
defaultMode: keep
headers:
defaultMode: keep
metrics:
prometheus:
addEntryPointsLabels: true
addServicesLabels: true
entryPoint: metrics
providers:
file:
filename: "/secrets/<FILE_1>.yaml"
consulCatalog:
prefix: <PREFIX>
exposedByDefault: false
cache: false
constraints: Tag(`tier=<TIER_NAME>`)
endpoint:
address: 172.17.0.1:8501
scheme: https
tls:
ca: "/secrets/<FILE_2>.pem"
cert: "/secrets/<FILE_3>.pem"
key: "/secrets/<FILE_4>.key"
insecureSkipVerify: true
serversTransport:
insecureSkipVerify: true