
Traefik Has a Free API: The Cloud-Native Reverse Proxy That Auto-Discovers Services
Nginx needs manual config updates for every service. Traefik discovers your Docker containers and Kubernetes services automatically. What Is Traefik? Traefik is a modern reverse proxy and load balancer that auto-discovers services from Docker, Kubernetes, Consul, and more. Add a label to your container — Traefik routes traffic to it. Docker Auto-Discovery # docker-compose.yml services : traefik : image : traefik:v3.0 command : - " --api.insecure=true" - " --providers.docker=true" - " --entrypoints.web.address=:80" - " --entrypoints.websecure.address=:443" - " --certificatesresolvers.le.acme.email=you@example.com" - " --certificatesresolvers.le.acme.storage=/letsencrypt/acme.json" - " --certificatesresolvers.le.acme.httpchallenge.entrypoint=web" ports : - " 80:80" - " 443:443" volumes : - /var/run/docker.sock:/var/run/docker.sock my-app : image : my-app:latest labels : - " traefik.enable=true" - " traefik.http.routers.myapp.rule=Host( \ `myapp.example.com \ `)" - " traefik.http.routers.
Continue reading on Dev.to DevOps
Opens in a new tab


