Traefik cluster mode on Kubernetes

12/5/2017

The Traefik documentation is unclear when running Traefik on Kubernetes.

I want multiple instances of traefik running in my cluster, sharing one configuration and the acme file.

The configuration is initially provided with a ConfigMap. Now the documentation states that one needs a separate KV-store to achieve traefik clustering.

But is that not covered by Traefik running Kubernetes mode?

-- Overbryd
kubernetes
traefik

1 Answer

12/8/2017

Briefly what you have to do is the following:

  • deploy a key value store (either inside or outside kubernetes) by choosing one of the supported (consul, etcd, zookeeper, boltdb)
  • Run the traefik storeconfig command once by passing a configuration file in order to copy your configuration into the kv store
  • Run traefik with the proper flags to load configuration from the kv store.

Everything Is explained here https://docs.traefik.io/user-guide/kv-config/

This is not a kubernetes specific guide, but it is quite simple to adapt it.

-- whites11
Source: StackOverflow