Přeskočit na obsah
Networking

Traefik tutorial

10 min čtení
TraefikReverse ProxyDocker

Traefik automaticky detekuje služby z Dockeru a Kubernetes.

Proč Traefik

  • Auto-discovery (Docker, K8s, Consul)
  • Automatické SSL (Let's Encrypt)
  • Dashboard
  • Middleware (auth, rate limit)

Docker setup

services: traefik: image: traefik:v3.0 command: - --providers.docker=true - --entrypoints.web.address=:80 - --certificatesresolvers.le.acme.httpchallenge.entrypoint=web ports: ['80:80', '443:443'] volumes: ['/var/run/docker.sock:/var/run/docker.sock:ro'] webapp: image: myapp labels: - traefik.http.routers.webapp.rule=Host(`app.example.com`) - traefik.http.routers.webapp.tls.certresolver=le

Middleware

labels: - traefik.http.middlewares.rl.ratelimit.average=100 - traefik.http.routers.webapp.middlewares=rl

Traefik pro Docker/K8s

Auto-discovery + auto SSL = ideální pro cloud-native.

CORE SYSTEMS tým

Enterprise architekti a DevOps inženýři. Stavíme systémy, které fungují.