<p>i'm using a k3s cluster with traefik and i want to expose a nginx web server that is outside of the cluster in a VM.</p>
<p>I want to know if it is even possible to do that and if it is, how do i do it.</p>
<p>I've tried creating a Service and an Ingress but unfortunately it didn't work</p>
<p>I've tried using a Service with the ExternalName type</p>
<pre><code>kind: Service
apiVersion: v1
metadata:
  name: website-a-service
  namespace: test
spec:
  type: ExternalName
  ports:
    - port: 80
      targetPort: 80
  externalName: 10.0.0.1
</code></pre>
<p>And an IngressRoute.</p>
<pre><code>apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: website-a-service-ingress-route
  namespace: test
spec:
  entryPoints:
    - web
  routes:
  - match: Host(`website-a-service.local`)
    kind: Rule
    services:
    - name: website-a-service
      kind: Service
      port: 80
</code></pre>
<p>After reading the kubernetes documentation i've learned that i can't use ExternalName, I don't know any way of making this work.</p>

CruzGGC
<p>I've got it working.</p>
<p>I've created an Entrypoint that matches the ip of my external machine and an IngressRoute to route everything to the address.</p>
<p>I've used a similar approach to <a href="https://stackoverflow.com/q/71210782/21420364">this question</a>.</p>
<p>Sorry for any inconvenience.</p>
