Kong Ingress controller and path base routing?


#1

Hi
I have succcessfully tried kongs ingress controller , but, I wasn’t able to find any documentation nor examples of how to use path based routing with the ingress controller? Does this mean it is not supported and that you must use Host header?

In my case, we (the company I work for) have a hosting solution where we don’t wan to expose any information about our internal hosts to our customers. Therefore we have used path based routing so far, but, this door seems closed with the ingress controller?

Can anyone confirm if this is the case?

BR

krister


#2

Hello @krimal,

Does this mean it is not supported and that you must use Host header?

Kong Ingress Controller follows the Ingress Spec of Kubernetes, which allows you to route your traffic based on HTTP Host header and HTTP path. So, it will be possible for Kong Ingress Controller to route your traffic based on path.

Having said that, there is current one limitation in Kong Ingress Controller that you might be running into.
You can use path based routing but you’ll need to specify the Host header in addtion to your path.
Please checkout an example in our getting started guide.

In my case, we (the company I work for) have a hosting solution where we don’t wan to expose any information about our internal hosts to our customers. Therefore we have used path based routing so far, but, this door seems closed with the ingress controller?

I recommend you to create Ingress rules with Host that is public and then use path based routing to break traffic up and send it to different services upstream.

Let me know if you have further questions.


#3

Thanks for fast reply. I will look into your suggestion and I think it can work for us.


#4

Hello @krimal,
If my answer above is acceptable, please mark it as “Solved”, to help future users who will navigate to this question. Thanks!