1

I have created an Openshift cluster where my pods and services are running. Before creating an ingress, i deployed a Kong ingress controller that auto provisioned a Azure load balancer.

enter image description here

From my understanding, Kong uses Nginx that can be configured to be used as a load balancer itself. Why does it need a Load balancer to be provisioned by Cloud infrastructure on which kubernetes cluster is running?

Sana.91
  • 1,999
  • 4
  • 33
  • 52

1 Answers1

1

You might have deployed the Kong Ingress controller with the service type : LoadBalancer

LoadBalancer service type is mainly use to expose the Kubernetes service using LB of Cloud provider.

ref : https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer

You can change the Kong service type to ClusterIP and it will as expected it will forward the request.

Harsh Manvar
  • 27,020
  • 6
  • 48
  • 102
  • I deployed Kong ingress controller via helm chart. So I believe that the service type load balancer is a default for Kong ingress controller. ... My question was that why was there a need of cloud infrastructure load balancer when nginx used behind Kong is itself a load balancer – Sana.91 Aug 28 '22 at 15:39
  • 1
    Loadbalancer is required to exposing the kong or nginx service to internet how can you expose the nginx or kong gateway to internet ? if you want to access it from internet as it's running inside the k8s service you need LB to expose the service to internet else it will be internal only. – Harsh Manvar Aug 28 '22 at 16:09