I just found that my traefik has no dashboard (404 not found) and I don't know why. Here is what I do:
- download traefik from url and put it in $PATH:
wget https://github.com/traefik/traefik/releases/download/v2.3.1/traefik_v2.3.1_linux_amd64.tar.gz
- refering document: https://doc.traefik.io/traefik/v2.0/operations/dashboard/#insecure-mode
/etc/traefik/traefik.yaml:
entryPoints:
web:
# Listen on port 8081 for incoming requests
address: :8080
providers:
file:
directory: "/etc/traefik/route-conf"
watch: true
log:
level: INFO
filepath: /var/log/traefik/traefik.log
accessLog:
filePath: /var/log/traefik/access.log
api:
dashboard: true
insecure: true
/etc/traefik/route-conf/route.yaml:
## Dynamic configuration
http:
routers:
my-router:
entryPoints:
- web
rule: "Path(`/foo`)"
service: service-foo
services:
service-foo:
loadBalancer:
servers:
- url: http://127.0.0.1:8888/
passHostHeader: false
- run it directly:
$ nohup traefik > /dev/null 2>&1 &
$ curl http://127.0.0.1:8080/dashboard/
404 page not found