# URL extension on a Traefik ingress controller to a Kubernetes pod

**URL:** <https://forum.inductiveautomation.com/t/url-extension-on-a-traefik-ingress-controller-to-a-kubernetes-pod/60197>\
**Category:** Ignition\
**Created:** [May 31, 2022, 9:26am UTC](https://forum.inductiveautomation.com/t/url-extension-on-a-traefik-ingress-controller-to-a-kubernetes-pod/60197 "2022-05-31T09:26:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![declan.mccarthy](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@declan.mccarthy](https://forum.inductiveautomation.com/u/declan.mccarthy)\
**Post date:** [May 31, 2022, 9:26am UTC](https://forum.inductiveautomation.com/t/url-extension-on-a-traefik-ingress-controller-to-a-kubernetes-pod/60197/1 "2022-05-31T09:26:07Z")

</div>

Hi, I’m having an issue where I am using StripPrefix middleware along with an Ingress Route definition to decide which Ignition gateway I access externally.  
I can access [http://npdtadkbaesch01d/foo/StatusPing](http://npdtadkbaesch01d/foo/StatusPing) correctly (where foo decides what service I’m to be redirected to but if I access home page [http://npdtadkbaesch01d/foo/](http://npdtadkbaesch01d/foo/) then the response from Ignition redirects to /Start and traefik reports a 404 error.

I have also seen the same thing on a non container setup with nginx acting as a load balancer to 2 ignition gatways. If I use a custom port for frontend access, then /Start is returned. If I use port 80 then all works ok.  
Below are my middleware & ingressRoute definition

```
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: ignition-ingressRoute
  namespace: default
spec:
  entryPoints:
    - web
  routes:
    #- match: Host(`company.org`) && PathPrefix(`/admin`)
    - match: PathPrefix(`/foo`)
      kind: Rule
      services:
        - name: ignition-foo
          port: 8088
      middlewares:
        - name: stripprefix

apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: stripprefix
spec:
  stripPrefix:
    prefixes:
      - /foo
```

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [May 31, 2022, 3:01pm UTC](https://forum.inductiveautomation.com/t/url-extension-on-a-traefik-ingress-controller-to-a-kubernetes-pod/60197/2 "2022-05-31T15:01:44Z")

</div>

See this thread:

> [@Reverse Proxy with subpath instead of subdomain](https://forum.inductiveautomation.com/t/reverse-proxy-with-subpath-instead-of-subdomain/58596):
>
> Hi everyone, I’ve been experimenting with a Reverse Proxy (Traefik) and been succesful in placing my whole gateway in a sudomain ([http://ignition.mydomain.com](http://ignition.mydomain.com)). The Reverse Proxy handles the TLS and automatically redirects http to https. I can get to the designer, vision launcher and any perspective site. Using Traefik, it seems the necessary headers are automatically added and the only thing I had to do was implement the main/statusping rewrite (see here: [Hard coded request for HTTP in Designe…](https://forum.inductiveautomation.com/t/hard-coded-request-for-http-in-designer-launcher-even-if-gateway-set-up-for-https/34027/9)

What we really need to make this work is some additional reverse proxy awareness at the Gateway level, where we can redirect based on a configured prefix.

---

<div class="post-metadata">

**Author:** ![declan.mccarthy](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@declan.mccarthy](https://forum.inductiveautomation.com/u/declan.mccarthy)\
**Post date:** [May 31, 2022, 3:12pm UTC](https://forum.inductiveautomation.com/t/url-extension-on-a-traefik-ingress-controller-to-a-kubernetes-pod/60197/3 "2022-05-31T15:12:00Z")

</div>

Thanks for the quick response, Kevin. So there is no way to make this work currently?

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [May 31, 2022, 3:13pm UTC](https://forum.inductiveautomation.com/t/url-extension-on-a-traefik-ingress-controller-to-a-kubernetes-pod/60197/4 "2022-05-31T15:13:59Z")

</div>

Not that I’m aware of…
