Rancher 2.0 and Traefik

Hi everybody,

First of all I wish to warn you that I am not a Kubernetes, Rancher or english expert, please take this into account if my question does not seem very relevant to you.

I am trying to use Rancher 2.0 and Traefik on a clean infrastructure composed by:

  • 1 VPS with Ubuntu 16.04, Docker and Rancher only
  • A cluster created with Rancher :
    ** 3 etcd and controlplane servers
    ** 3 workers with one dedicated to be a load balancer with Traefik running on it
    ** 1 nfs server

With Rancher 1.6. Traefik was running well, delivered Let’s Encrypt certificates to my containers properly based upon frontend rules, I was pretty happy.

With Rancher 2.0, I managed to make Traefik ran on the appropriate node with some difficulties (I did not find what to enter for the “nodeSelector” parameter so I set it afterwards in Rancher…).

I did a simple test. I tried to run nginx and add labels like I did with Rancher 1.6:

  • traefik.enable = true
  • traefik.port = 80
  • traefik.frontend.rule = Host:some.site.com

The frontend rule is not accepted in Rancher due to restrictions about the format. I think it is related to Kubernetes but I did not find the answer on the web.

If somebody can give me some information, links or documentation about this I will appreciate. I am a little bit lost with the Traefik documentation. It is difficult for me to link the Traefik documentation with the Rancher web UI…

Thanks for help!

Labels can only contain very specific characters. Træfik uses annotations.

Hi Vincent,

Sorry for this late answer.
I used annotations like you suggested but I am facing another issue related to my deployment I think.

As mentioned in the Traefik notes, it looks like this Traefik helm only works on AWS or GKE which is not my case. I tried to force an external IP in my config but Traefik stays “pending”.

I will try something else, at least cert-manager to have Let’s Encrypt certificate at least.
Thanks for your help

Hi,

I use Traefik (from Helm) as an Ingress Controller. Everything works like a charm. But did you find a way to use nodeSelector parameter ? I configure it later but I wanted to know how to do this.

Thanks