Deploy Multiple Kong Instances on different namespaces in a k8s cluster


#1

Is it possible to deploy one instance of kong per namespace on a k8s cluster?

I don’t want all request to all my services to be routed through just one loadbalancer (the loadbalancer created by kong).

Does any one have a way around this?

cc: @thibaultcha @hisham


#2

Yes, this should be possible.

Have you tried doing it and are facing any specific problem?


#3

After installing Kong according to the steps specified in the documentation, I tried to deploy two different ingresses in separate namespaces, both having an annotation of kubernetes.io/ingress.class: "kong". I however noticed the the two ingresses have the same address when I run kubectl get ingress in the different namespaces.

Is it possible to get different addresses (i.e different loadbalancers ) for different kong ingresses?


#4

You will need to deploy two Ingress Controllers with different ingress.class.

Basically, ingress.class is used to filter the ingresses that an Ingress controller should satisfy.

Once, you deploy two ingress controllers with different ingress.class, create one ingress rule with ingress.class of the first controller and another with the ingress.class of the second controller, and you should see both get different addresses.