Home > Software engineering >  Do I need `kube-proxy` to use `Ingress` for load distribution?
Do I need `kube-proxy` to use `Ingress` for load distribution?

Time:11-07

Do I need kube-proxy to use Ingress for load distribution? Or do you get the endpoint and distribute it directly to the pod and use kube-proxy only when using Load Balancer and nodeport?

If so, then when you use Ingress for load distribution, it only takes care of the load from routes to service, and the load from service to pod is still done through kube-proxy. Is this the right understanding?

If not, what is the mechanism?

I'm a newbie to K8s, so if there is something wrong with my question itself, or with my understanding, please point it out, thank you very much!

I've looked up some information and it says that Ingress does not use kube-proxy to do the load.

I'm skeptical, I'd like to know why it doesn't use it and how it implements the kube-proxy part of the functionality?

CodePudding user response:

Since Ingress is just an API it actually depends on the implementation.

For example the traefik proxy ingress implementation is making loadbalancing over the endpoints it queries from the kubernetes API server. In that case the kube-proxy is not used.

Keep in mind: kube-proxy usually configures DNAT rules in iptables, so it is not a user space proxy and connections to the Service IPs are loadbalanced by the kernel and iptables.

  • Related