Simplecontainer introduced the Traefik provider

Simplecontainer introduced the Traefik provider

One more integration to make exposing Docker containers through ingress effortless — whether on a single node or across a distributed cluster.

Traefik Providers and Dynamic Configuration

Traefik is designed to be highly flexible and can pull its service discovery and routing configuration from multiple providers.
A provider acts as a source of truth that Traefik continuously monitors in order to build and update its dynamic configuration.

Some of the providers available are:

  • Kubernetes – Fetches services, ingresses, and CRDs directly from a Kubernetes cluster.
  • Docker – Automatically discovers containers, labels, and networking information from a Docker engine or Swarm.
  • HTTP – Allows Traefik to retrieve configuration from any HTTP endpoint in real-time.
  • etcd – Leverages a distributed key-value store to keep configuration highly available and consistent.

Using HTTP as a Provider

When the HTTP provider is selected, Traefik expects to receive configuration in a specific JSON or YAML format.
This configuration is dynamic, meaning changes can be pushed to Traefik without restarting it.

Through the HTTP provider, you can define:

  • Routers – Rules that determine how incoming requests are matched and directed.
  • Services – The backend services (e.g., containers, pods, or external endpoints) that receive the traffic.
  • TLS – Certificates and options for securing communication over HTTPS.

This approach is particularly useful when you want fine-grained control over routing or need to integrate Traefik with an external system that can generate or serve configuration dynamically.

Simplecontainer introduced an HTTP provider

Simplecontainer now includes an HTTP Traefik provider that runs as a standalone container. The provider communicates directly with the local Simplecontainer node and generates dynamic configuration in the format required by Traefik.

This allows Traefik to automatically consume routing, service, and TLS definitions without requiring manual configuration.

prefix: simplecontainer.io/v1
kind: containers
meta:
  name: traefik-provider
  group: traefik
  labels:
    test: "testing"
spec:
  image: "quay.io/simplecontainer/traefik-provider"
  tag: "latest"
  replicas: 1
  ports:
    - container: "80"

Traefik can leverage this provider easily, eg, static configuration.

providers:
  http:
    endpoint: "http://bridge.traefik.traefik-provider.private"    
    pollInterval: "1s"
    
entryPoints:
  web:
    address: ":80"     

Now, to deploy a dynamic Traefik configuration, use a custom resource.

prefix: traefik.io/v1
kind: custom
meta:
  name: dynamic
  group: traefik
spec:
  traefik:
    enable: "true"
    http:
      routers:
        my-router:
          rule: "Host(`example.local`)"
          entrypoints:
          - "web"
          service: "my-service"
      services:
        my-service:
          loadBalancer:
            servers:
              - url: http://bridge.nginx.nginx.private

With the Simplecontainer Traefik provider, you can easily attach a Traefik router to any Docker container and expose it through a fully qualified domain name (FQDN) — for example, example.local.

To keep configurations organized, you can define multiple custom resource files. These files remain separate for readability but are automatically merged into a single configuration by the Traefik provider.

The provider simplifies router configuration for standalone nodes while also supporting distributed container environments.
This enables:

  • Running a single node with load balancing.
  • Scaling to multiple Traefik instances for high availability.
  • Seamlessly routing traffic to containers running on other nodes.

A full example can be found in the examples repository under examples/tests/traefik-simplecontainer-provider/definitions.

GitHub - simplecontainer/examples: The collection of the definitions and object examples for the simple container manager.
The collection of the definitions and object examples for the simple container manager. - simplecontainer/examples