DEV Community

Alex Spinov
Alex Spinov

Posted on

Traefik Has a Free Cloud-Native Reverse Proxy — Auto-Discovery for Docker and Kubernetes

Traefik Auto-Discovers Services in Docker and Kubernetes

Nginx needs manual config updates every time you add a service. Traefik watches your Docker containers and Kubernetes pods — routes traffic automatically.

What Makes Traefik Special

  • Auto-discovery — detects new containers/pods automatically
  • Lets Encrypt — automatic TLS certificates
  • Middleware — rate limiting, auth, headers, compression
  • Load balancing — round-robin, weighted, sticky sessions
  • Dashboard — real-time traffic visibility
  • Multi-provider — Docker, K8s, Consul, file

Docker Compose Example

services:
  traefik:
    image: traefik:v3.0
    command:
      - --providers.docker=true
      - --entrypoints.web.address=:80
    ports:
      - "80:80"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

  app:
    image: myapp:latest
    labels:
      - traefik.http.routers.app.rule=Host(`app.example.com`)
Enter fullscreen mode Exit fullscreen mode

Add a new service with labels — Traefik picks it up instantly.

Traefik vs Nginx

Feature Traefik Nginx
Auto-discovery Yes No
Docker native Labels Config files
Lets Encrypt Built-in Certbot
Dashboard Built-in Third-party
Hot reload Yes Signal

Why Traefik

  1. Zero-config routing — labels on containers = done
  2. Auto TLS — certificates managed automatically
  3. Cloud-native — built for Docker and Kubernetes
  4. Middleware — auth, rate limiting in one line

📧 spinov001@gmail.com — Infrastructure consulting

Follow for more DevOps tool reviews.

Top comments (0)