ClusterIP: None and failing pods

懵懂的女人 提交于 2021-02-10 16:48:54

问题


I have an NGINX in front of several PODs, exposed through ClusterIP: none.

NGINX is forwarding traffic to these nodes like that:

upstream api {
   server my-api:1066;
}

Will this configuration distribute traffic evenly among all PODs behind the my-api hostname? Will failing PODs be removed from the hostname resolution?


回答1:


The default traffic distribution for Kubernetes services is random based on the default proxy mode: iptables. (This is likely your case)

In very old Kubernetes versions (<1.1) the default proxy mode: userspace would default to round-robin (you can still switch to that mode if you'd like to)

The newer way (< 1.8) of doing round robin (optionally) is to use proxy mode: ipvs.

You can also look at other solutions like Cillium that provide load balancing capabilities.



来源:https://stackoverflow.com/questions/53186324/clusterip-none-and-failing-pods

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!