<p>I am following the Getting Started guide for Traefik from <a href="https://docs.traefik.io/" rel="nofollow noreferrer">here</a> and am trying to launch the service into Kubernetes (Minikube) instead of Docker:</p>

<pre><code>Edit your docker-compose.yml file and add the following at the end of your file.
# ...
  whoami:
    image: emilevauge/whoami # A container that exposes an API to show its IP address
    labels:
      - "traefik.frontend.rule=Host:whoami.docker.localhost"**
</code></pre>

<p>I am guessing I run it as:</p>

<pre><code>kubectl run whoami-service --image=emilevauge/whoami --labels='traefik.frontend.rule=Host:whoami.docker.localhost'
</code></pre>

<p>however that generates an error of:</p>

<pre><code>The Deployment "whoami-service" is invalid:
* metadata.labels: Invalid value: "'traefik.frontend.rule": name part must consist of alphanumeric characters, '-', '_' or '.', and....
</code></pre>

<p>So what am I missing here? How do I deploy the above to my Minikube Kubernetes cluster?</p>

TheEdge
<p>I'm not sure if this is along the lines of what you're looking for, but Traefik has a <a href="https://docs.traefik.io/user-guide/kubernetes/" rel="nofollow noreferrer">small tutorial</a> for getting an Ingress controller set up on Kubernetes, with a <a href="https://docs.traefik.io/configuration/backends/kubernetes/" rel="nofollow noreferrer">great document</a> on configuration, as well. </p>

<p>If you'd just like to get that particular image working, you may be able to pass the label as an argument to the pod, possibly with <code>kubectl run</code>. From the output of <code>kubectl run help</code>:</p>

<pre><code># Start the nginx container using the default command, but use custom arguments (arg1 .. argN) for that command.
kubectl run nginx --image=nginx -- &lt;arg1&gt; &lt;arg2&gt; ... &lt;argN&gt;
</code></pre>

<p>Or possibly manually in a manifest:</p>

<pre><code>...
containers:
  - name: whoami
    image: emilevauge/whoami
    args: ["traefik.frontend.rule: "Host:whoami.docker.localhost"]
</code></pre>

<p>Having never worked with the image in the example before, I don't know if either the above examples will actually work.</p>

<p>Hope that helps a little!</p>
