<p>Can someone give a simple example on how to route the following URLs:</p>

<pre><code>http://monitor.app.com/service-one
http://monitor.app.com/service-two
http://monitor.app.com/service-three
http://monitor.app.com/service-four
</code></pre>

<p>To the following backend services?</p>

<pre><code>http://service-one/monitor
http://service-two/monitor
http://service-three/monitor
http://service-four/monitor
</code></pre>

<p>Preferably using the [file] syntax of Traefik, although any is fine.</p>

<p>Here is a configuration for your example. Adjust it according to your real cluster configuration:</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: service-one
spec:
  selector:
    k8s-app: service-one-app
  ports:
  - port: 80
    targetPort: 8080
---
apiVersion: v1
kind: Service
metadata:
  name: service-two
spec:
  selector:
    k8s-app: service-two-app
  ports:
  - port: 80
    targetPort: 8080
---
apiVersion: v1
kind: Service
metadata:
  name: service-three
spec:
  selector:
    k8s-app: service-three-app
  ports:
  - port: 80
    targetPort: 8080
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: monitor.app
  annotations:
    kubernetes.io/ingress.class: traefik
    traefik.ingress.kubernetes.io/rewrite-target: /monitor # set path to result request
spec:
  rules:
  - host: monitor.app.com
    http:
      paths:
      - path /service-one  # path for routing, it will be removed because of PathPrefixStrip settings
        backend:
          serviceName: service-one
          servicePort: 80
      - path /service-two  # path for routing, it will be removed because of PathPrefixStrip settings
        backend:
          serviceName: service-two
          servicePort: 80
      - path /service-three  # path for routing, it will be removed because of PathPrefixStrip settings
        backend:
          serviceName: service-three
          servicePort: 80
</code></pre>

<p>Additional information could be found here:</p>

<ul>
<li><a href="https://docs.traefik.io/user-guide/kubernetes/" rel="nofollow noreferrer">Kubernetes Ingress Controller</a></li>
<li><a href="https://docs.traefik.io/configuration/backends/kubernetes/" rel="nofollow noreferrer">Kubernetes Ingress Provider</a></li>
<li><a href="https://github.com/containous/traefik/pull/1723/files" rel="nofollow noreferrer">kubernetes ingress rewrite-target implementation #1723</a></li>
</ul>
