1、安装

1
2
3
4
wget https://github.com/containous/traefik/releases/download/v1.7.9/traefik_linux-amd64
curl -k -o traefik.toml https://raw.githubusercontent.com/containous/traefik/master/traefik.sample.toml
chmod +x traefik_linux-amd64
./traefik_linux-amd64 --configFile=traefik.toml
1
ERRO[2019-03-05T09:00:06+08:00] Failed to retrieve information of the docker client and server host: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

2、配置

2.1 修改80端口

1
2
3
[entryPoints]
    [entryPoints.http]
    address=":8090"

2.1 修改8080端口

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
[entryPoints]
    [entryPoints.traefik]
    address=":8091"

[metrics]
  [metrics.prometheus]
    entryPoint = "traefik"
    buckets = [0.1,0.3,1.2,5.0]
# http://127.0.0.1:8091/dashboard/
# curl http://127.0.0.1:8091/metrics
# curl http://127.0.0.1:8091/health

3、配置systemd

4、链接