Multiple paths rewriting (proxying) by Kong

Hi Harry,

I have multiple paths deployed with one microservice underneath of Kong.
So there are three Ingresses and each Ingress has it’s own KongIngress kind.
But we have only one Service kind on top of them so I have to introduce all KongIngresses as a list by saying
annotations:
configuration.konghq.com: iot-first-api, iot-second-api

But it seems to be happy just when the value is one and if you want to have multiple values as a list , it doesn’t work anymore

Can you elaborate on what you are trying to accomplish with the comma separate value list?

You don’t necessarily need to association KongIngress with Service resource. You only need to do that if you want to override certain properties specific to Kong.

The problem is that I have several backend paths in one Ingress and also one service but I have to proxy each of the to the different paths

http:
    paths:

      - path: /iot/api/method1
        backend:
          serviceName: myService
          servicePort: 80

      - path: /iot/api/method2
        backend:
          serviceName: myService
          servicePort: 80

The end-user must see and invoke “/iot/api/method1” and “/iot/api/method2”
But
First path needs to be routed to “/api/hello/ahhh/method1” (actual path of rest api)
Second path needs to be routed to “/rest/bye/hey/api/method2” (actual path of rest api)

Both of them have the same Service -> “myService”

I’m still looking forward to hearing from you

You can use request transformer plugin for each ingress resource to manipulate the path.


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ