Kong Ingress 控制器说明

Kong Ingress Controller Clarification

当我通过这个 doc 实现 KONG Ingress Controller for Kubernetes 时,有人提到

One of the main features provided by an Ingress controller is the ability to react to changes in the Kubernetes cluster. This means if we scale a deployment or a pod dies we need to update the Kong configuration (a Target in this case)

他们说他们会定期检查 POD 中的变化并相应地更新 KONG UPSTREAM 的 TARGET。我的问题是,这就是 Kubernetes 中的服务的设计目的,为什么不直接指向服务 ClusterIPPort 本身,它们将充当内部服务发现。

Kong 入口控制器摘录readme

Why endpoints and not services

The Kong ingress controller does not use Services to route traffic to the pods. Instead it uses the Endpoints API to bypass kube-proxy to allow Kong features like session affinity and custom load balancing algorithms. It also removes overhead, such as conntrack entries for iptables DNAT.