<p>Using Traefik as an ingress controller (on a kube cluster in GCP). 
Is it possible to create an ingress rule that uses a backend service from a different namespace?</p>

<p>We have a namespace for each of our "major" versions of code.</p>

<p>1-service.com -> 1-service.com ingress in the 1-service ns -> 1-service svc in the same ns</p>

<p>2-service.com -> 2-service.com ingress in the 2-service ns... and so on</p>

<p>I also would like another ingress rule in the "unversioned" namespace that will route traffic to one of the major releases.</p>

<p>service.com -> service.com ingress in the "service" ns -> X-service in the X-service namespace</p>

<p>I would like to keep major versions separate in k8s using versioned host names (1-service.com etc), but still have a "latest" that points to the latest of the releases.</p>

<p>I believe voyager can do cross namespace ingress -> svc. can Traefik do the same??</p>

<p>You can use a workaround like this:</p>

<ol>
<li>Create a Service with type <code>ExternalName</code> in your namespace when you want to create an ingress:</li>
</ol>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: service-1
  namespace: unversioned
spec:
  type: ExternalName
  externalName: service-1.service-1-ns.svc.cluster.local
  ports:
  - name: http
    port: 8080
    protocol: TCP
</code></pre>

<ol start="2">
<li>Create an ingress that point to this service:</li>
</ol>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: traefik
  name: ingress-to-other-ns
  namespace: service-1-ns
spec:
  rules:
  - host: latest.example.com
    http:
      paths:
      - backend:
          serviceName: service-1
          servicePort: 8080
        path: /
</code></pre>
