# Proxy, Two Services, Two Different Ports

**URL:** <https://community.traefik.io/t/proxy-two-services-two-different-ports/21648>\
**Category:** Traefik v2\
**Tags:** tcp, kubernetes-ingress\
**Created:** [February 28, 2024, 6:56pm UTC](https://community.traefik.io/t/proxy-two-services-two-different-ports/21648 "2024-02-28T18:56:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bugs5382](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/bugs5382/32/8317_2.png) [@Bugs5382](https://community.traefik.io/u/Bugs5382)\
**Post date:** [February 28, 2024, 6:56pm UTC](https://community.traefik.io/t/proxy-two-services-two-different-ports/21648/1 "2024-02-28T18:56:06Z")

</div>

Greeting everyone.

I have been beating myself over the past few days with issues. I looked up the forums here and couldn't find my exact problem. It goes like this.

I currently have two ClusterIP Services with a single pod. for each service.

1. frontend - pod runs on port 80 -- [site.domain.org](http://site.domain.org)
2. controller (for GraphQL) - runs on port 3000

The website loads fine when I get to the main URL using [https://site.domain.org](https://site.domain.org); however, inside the web react code, I have an Apollo client that connects to [https://site.domain.org:3000/graphql](https://site.domain.org:3000/graphql) -- I can't seem to get Traefik to route traffic correctly.

```auto
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: ingressroute
  namespace: <it is in the same namespace as both controllers>
  annotations:
    kubernetes.io/ingress.class: traefik-external
spec:
  entryPoints:
    - websecure
  routes:
    - kind: Rule
      match: Host(`site.domain.org`) && PathPrefix(`/`)
      services:
        - kind: Service
          name: controller
          port: 3000
    - kind: Rule
      match: Host(`site.domain.org`) && PathPrefix(`/graphql`)
      services:
        - kind: Service
          name: controller
          port: 3000
  tls:
    secretName: <tls is generating correctly>
---
apiVersion: v1
kind: Service
metadata:
  name: controller
  namespace: <it is in the same namespace as both controllers>
spec:
  ports:
    - protocol: TCP
      port: 3000
      targetPort: 3000
  selector:
    run: controller
---
apiVersion: v1
kind: Service
metadata:
  name: frontend
  namespace: <it is in the same namespace as both controllers>
spec:
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
  selector:
    run: frontend

```

I can confirm that I can browse directly to the pod on port 3000 using port forwarding through the Kubernetes environment without issue. So, I suspect that this is going to be a proxy config.

On the web, it does query: [https://site.domain.org](https://site.domain.org): **3000** /graphql, but I can always change this syntax.

Thanks,  
Shane

---

<div class="post-metadata">

**Author:** ![Bugs5382](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/bugs5382/32/8317_2.png) [@Bugs5382](https://community.traefik.io/u/Bugs5382)\
**Post date:** [March 2, 2024, 2:13am UTC](https://community.traefik.io/t/proxy-two-services-two-different-ports/21648/2 "2024-03-02T02:13:47Z")

</div>

And for above... the / path goes to port 80. not 3000, so that is a mistake.
