title: traefik v2.0 labels with rancher 2.2.8 not allowed
body: <p>I'm running the latest version of traefik (v2.0) managed via rancher v2.2.8.</p>
  
  <p>Traefik is running fine.
  It is accepting connections and I can reach the dashboard via port 8080.</p>
  
  <p>So I created a new workload with the <code>containous/whoami</code> image to expose via traefik.</p>
  
  <p>However, if I try to set the label key <code>traefik.http.routers.whoami.rule</code> with the value <code>Host(`whoami.example.com`)</code> via rancher, rancher declines the value because of the following reason:</p>
  
  <pre><code>Validation failed in API: Deployment.apps "whoami" is invalid: spec.template.labels: Invalid value: "Host(`whoami.example.com`)": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')
  </code></pre>
  
  <p>I do understand the error message, but how do I get the routing to work without using characters like <code>(</code> and <code>`</code>?</p>
  
  <p>traefik requires the label to be set with characters like <code>(</code> and <code>`</code>, but rancher does not allow such characters.</p>
  
  <p>I used <a href="https://docs.traefik.io/v2.0/getting-started/quick-start/#traefik-detects-new-services-and-creates-the-route-for-you" rel="nofollow noreferrer">https://docs.traefik.io/v2.0/getting-started/quick-start/#traefik-detects-new-services-and-creates-the-route-for-you</a> as a guideline to set the label.</p>
  
  <p><strong>Edit:</strong> <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set</a> also states, that those characters are not permitted for label key and value.</p>
  
  <p>Not as important a question, but how does traefik v2.0 even work with kubernetes then? Does it not use labels?</p>