#atom

Modern cloud-native edge router and reverse proxy

Core Idea: Traefik is an open-source edge router and reverse proxy that automatically discovers services and manages their traffic routing, designed specifically for microservices and containerized environments.

Key Elements

Key Features

Technical Specifications

Architecture Components

Implementation Example

Basic Traefik configuration with Docker (traefik.yml):

entryPoints:
  web:
    address: ":80"
    http:
      redirections:
        entryPoint:
          to: websecure
          scheme: https
  websecure:
    address: ":443"

providers:
  docker:
    exposedByDefault: false

certificatesResolvers:
  letsencrypt:
    acme:
      email: your-email@example.com
      storage: acme.json
      httpChallenge:
        entryPoint: web

Docker Compose example with Traefik labels:

version: '3'

services:
  traefik:
    image: traefik:v2.9
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ./traefik.yml:/etc/traefik/traefik.yml
      - ./acme.json:/acme.json
    
  webapp:
    image: nginx
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.webapp.rule=Host(`example.com`)"
      - "traefik.http.routers.webapp.entrypoints=websecure"
      - "traefik.http.routers.webapp.tls.certresolver=letsencrypt"

Use Cases

Additional Connections

References

  1. Traefik official documentation: https://doc.traefik.io/
  2. GitHub repository: https://github.com/traefik/traefik

#reverse-proxy #containers #microservices #devops #kubernetes #docker


Connections:


Sources: