Questions tagged [traefik]

Træfɪk is a modern HTTP reverse proxy and load balancer made to deploy microservices with ease

Træfik (pronounced like traffic) is a modern HTTP reverse proxy and load balancer made to deploy microservices with ease. It supports several backends (Docker, Swarm mode, Kubernetes, Marathon, Consul, Etcd, Rancher, Amazon ECS, and a lot more) to manage its configuration automatically and dynamically.

Useful links

2251 questions
7
votes
2 answers

Ansible: How to set docker container labels with dynamic key names?

I try to start docker containers with traefik labels. To create a traefik router for a container you have to put some labels like this. app_names: - tower01 - tower02 docker_labels: awx_web: traefik.enable: "true" …
7
votes
1 answer

Docker swarm worker behind NAT

I am wanting to have a worker node on a server I have that is behind a NAT (i.e can't expose ports publicly) I thought this wasn't a problem but it turns out to be one: On this server behind the NAT I run: docker swarm join --token SWMTKN-1...…
maxisme
  • 3,974
  • 9
  • 47
  • 97
7
votes
0 answers

How to tell Traefik 2.1 to use a user-defined wildcard certificate for a router?

I'm trying to get Traefik to use a manually configured wildcard certificate for all routers that have a matching Host rule. I assumed Traefik would try to find a certificate based on the domains used in the Host rule, but it always uses the default…
Strayer
  • 3,050
  • 3
  • 30
  • 40
7
votes
1 answer

Using wildcard certificates in Traefik v2 on Docker Swarm

I am using the following Docker Compose file to deploy Traefik on a swarm cluster. version: "3.7" services: traefik: image: traefik:v2.1 command: - "--api.dashboard=true" - "--accesslog=true" - "--log.level=INFO" …
akrantz01
  • 628
  • 1
  • 9
  • 19
7
votes
1 answer

Traefik config file location using docker

Traefik's Getting Started guid is difficult to follow in any step by step fashion. It has the following problems: Getting Started suggests running traefik as a command, but no commands can be run on the traefik image and you must instead use…
Alexander Kleinhans
  • 5,950
  • 10
  • 55
  • 111
7
votes
1 answer

How to fix 'failed to find any PEM data in key input' error?

I'm setting up Traefik with provided certificates for HTTPS using docker Swarm and it doesn't load them failing with failed to find any PEM data in key input I've tried to set it up with relative and absolute paths (see…
IvanR
  • 198
  • 1
  • 1
  • 12
7
votes
0 answers

Traefik : Add Custom Header Only for specific files

UPDATE: ATM this is not possible via traefik. I have openend an issue : https://github.com/containous/traefik/issues/4228 I want to add cache-control headers to files having the Content/Type application/json and image/png. ATM the moment the way to…
Syed Osama Maruf
  • 1,895
  • 2
  • 20
  • 37
7
votes
1 answer

Start docker container on incoming HTTP request

I have a server running multiple web applications inside separate docker containers. I am using Traefik as a reverse proxy. So, whenever a container is idle for, say 15 mins, I stop the container from inside (end the running process which causes the…
7
votes
1 answer

Can't get real user's IP from X-Forwarded-For

I'm running Traefik 1.7.3 on a single node Kubernetes cluster and I'm trying to get the real user IP from the X-Forwarded-For header but what I get instead is X-Forwarded-For: 10.244.0.1 which is an IP in my k8s cluster. Here's my Traefik deployment…
tharant
  • 71
  • 1
  • 3
7
votes
0 answers

Traefik - How to log the request_body

I am new to Traefik and trying to find a way to capture and log the request_body. In Nginx by adding $request_body in nginx.conf it will log the body in access.log. Is this possible in Traefik ? Thanks
Bharath
  • 121
  • 1
  • 3
7
votes
1 answer

Traefik routing to both known and wildcard subdomain on a single domain

Is it possible to have a wildcard subdomain that does not include a specific subdomain? *.mydomain.com OK login.mydomain.com SKIP I cannot access my login container when using a wildcard on my app container. Below is an image of what I am trying to…
Jason Raimondi
  • 311
  • 1
  • 3
  • 9
7
votes
3 answers

SSL passthrough with Traefik

I need to send the SSL connections directly to the backend, not decrypt at my Traefik. The backend needs to receive https requests. I tried the traefik.frontend.passTLSCert=true option but getting "404 page not found" error when I access my web app…
Quinn Wynn
  • 1,334
  • 2
  • 15
  • 20
7
votes
2 answers

Using Traefik to reverse proxy Grafana at a suburl; 404 responses

I have tried my best to follow the documentation for both Grafana and Traefik to reverse proxy incoming requests to https://metrics.mydomain/grafana through Traefik to a Grafana instance running as a container, but I get 404 responses from Grafana…
Ben Collins
  • 20,538
  • 18
  • 127
  • 187
7
votes
1 answer

Docker Traefik and letsencrypt wildcard

I've been trying to get traefik to install wildcard cert on my domain which requires dns challenge from reading the logs it seems it was able to actually issue the cert but not install them correctly time="2018-04-07T19:10:35Z" level=debug…
Mouath
  • 181
  • 1
  • 8
7
votes
1 answer

Multiple instances of Traefik in different kubernetes namespaces

We're trying to run a kubernetes cluster with three namespaces: public contains services accessible to anyone internal contains services that should only be accessed by members of staff engineering contains services that should only be visible to…
DanielM
  • 6,380
  • 2
  • 38
  • 57