How to know which DS forward the real traffic to RS in IPVS mode?



hey All, i’m using the ipvs mode in k8s 1.11.1;

i found that in this mode , every node will be a DS(DirecotorServer), every node will have the same rules output with ipvsadm -ln;

but when use the ipvsadm -lnc to lookup which DS is corresponding to the RS, is very difficult, i don’t know which DS is forwarding, so what i only can do is try ipvsadm -lnc each by each?
is there an awesome way to know ,which DS is actually working for an service connection?

PS: 中文描述

IPVS模式下, POD访问Service时候具体后Service后的POD连接的,怎么知道是在哪一台DS(NODE)上转发的,RS我知道 他是有RR的算法去调度, 但是在K8S上DS本身实际也是个集群概念(所有node都是DirectorServer),使用ipvsadm -lnc 能看到连接, 但是我不知道实际访问的时候,哪一台会充当DS,所以只能一台一台试,感觉很low B; ipvsadm -ln 每台机器都是一样,因为是规则同步; ipvsadm -lnc是查看连接的 ,真正访问pod 的连接使用这个可以看到?有没有优雅的方法知道我某个pod 访问SVC的连接由哪一台DS 转发?


misunderstanding the ipvs mode, problem solved! pelase close this topic


Can you please share what was the misunderstanding, so someone else can benefit? :slight_smile:

And k think you should be able to make it as solved, but not sure