https://github.com/kubernetes/kubernetes/issues/73154
可能受
cleanup-ipvs
参数的影响
# ./kube-proxy --help |grep clean --cleanup If true cleanup iptables and ipvs rules and exit. --cleanup-ipvs If true make kube-proxy cleanup ipvs rules before running. Default is true (default true)
为解决1.12.2 ipvs rs不更新 问题,升级到1.12最新的1.12.5
版本,升级过程中似乎有断网问题,应用会受到影响,似乎每重启一次kube-proxy
,该node上容器网络就中断一会
以上图中业务使用169
网段的Cluster IP
来访问另一个业务,当kube-proxy重启时,连不上Clsuter IP
,导致响应慢
Url监控
程序在kube-proxy
重启时,由于连不上coredns
,导致大面积误报,此故障也可以佐证以上图中的情况。
# grep "169.169.0.2" kube-proxy.INFO I0120 16:41:24.997360 11442 graceful_termination.go:160] Trying to delete rs: 169.169.0.2:53/TCP/172.20.65.159:53 I0120 16:41:24.997390 11442 graceful_termination.go:171] Not deleting, RS 169.169.0.2:53/TCP/172.20.65.159:53: 0 ActiveConn, 12 InactiveConn I0120 16:41:24.997410 11442 graceful_termination.go:154] Adding an element to graceful delete rsList: 169.169.0.2:53/TCP/172.20.65.159:53 I0120 16:41:24.997423 11442 graceful_termination.go:66] Adding rs 169.169.0.2:53/TCP/172.20.65.159:53 to graceful delete rsList I0120 16:41:24.997432 11442 graceful_termination.go:160] Trying to delete rs: 169.169.0.2:53/TCP/172.20.38.193:53 I0120 16:41:24.997455 11442 graceful_termination.go:171] Not deleting, RS 169.169.0.2:53/TCP/172.20.38.193:53: 0 ActiveConn, 12 InactiveConn I0120 16:41:24.997474 11442 graceful_termination.go:154] Adding an element to graceful delete rsList: 169.169.0.2:53/TCP/172.20.38.193:53 I0120 16:41:24.997483 11442 graceful_termination.go:66] Adding rs 169.169.0.2:53/TCP/172.20.38.193:53 to graceful delete rsList I0120 16:41:24.997490 11442 graceful_termination.go:160] Trying to delete rs: 169.169.0.2:53/TCP/172.20.41.162:53 I0120 16:41:24.997516 11442 graceful_termination.go:171] Not deleting, RS 169.169.0.2:53/TCP/172.20.41.162:53: 0 ActiveConn, 11 InactiveConn I0120 16:41:24.997530 11442 graceful_termination.go:154] Adding an element to graceful delete rsList: 169.169.0.2:53/TCP/172.20.41.162:53 I0120 16:41:24.997537 11442 graceful_termination.go:66] Adding rs 169.169.0.2:53/TCP/172.20.41.162:53 to graceful delete rsList I0120 16:41:24.997753 11442 graceful_termination.go:160] Trying to delete rs: 169.169.0.2:53/UDP/172.20.65.159:53 I0120 16:41:24.997778 11442 graceful_termination.go:171] Not deleting, RS 169.169.0.2:53/UDP/172.20.65.159:53: 0 ActiveConn, 13855 InactiveConn I0120 16:41:24.997795 11442 graceful_termination.go:154] Adding an element to graceful delete rsList: 169.169.0.2:53/UDP/172.20.65.159:53 I0120 16:41:24.997802 11442 graceful_termination.go:66] Adding rs 169.169.0.2:53/UDP/172.20.65.159:53 to graceful delete rsList I0120 16:41:24.997815 11442 graceful_termination.go:160] Trying to delete rs: 169.169.0.2:53/UDP/172.20.38.193:53 I0120 16:41:24.997867 11442 graceful_termination.go:171] Not deleting, RS 169.169.0.2:53/UDP/172.20.38.193:53: 0 ActiveConn, 13877 InactiveConn I0120 16:41:24.997885 11442 graceful_termination.go:154] Adding an element to graceful delete rsList: 169.169.0.2:53/UDP/172.20.38.193:53 I0120 16:41:24.997893 11442 graceful_termination.go:66] Adding rs 169.169.0.2:53/UDP/172.20.38.193:53 to graceful delete rsList I0120 16:41:24.997899 11442 graceful_termination.go:160] Trying to delete rs: 169.169.0.2:53/UDP/172.20.41.162:53 I0120 16:41:24.997925 11442 graceful_termination.go:171] Not deleting, RS 169.169.0.2:53/UDP/172.20.41.162:53: 0 ActiveConn, 13920 InactiveConn I0120 16:41:24.997945 11442 graceful_termination.go:154] Adding an element to graceful delete rsList: 169.169.0.2:53/UDP/172.20.41.162:53 I0120 16:41:24.997952 11442 graceful_termination.go:66] Adding rs 169.169.0.2:53/UDP/172.20.41.162:53 to graceful delete rsList I0120 16:41:25.008265 11442 graceful_termination.go:160] Trying to delete rs: 169.169.0.2:53/UDP/172.20.38.193:53 I0120 16:41:25.008424 11442 graceful_termination.go:171] Not deleting, RS 169.169.0.2:53/UDP/172.20.38.193:53: 0 ActiveConn, 13877 InactiveConn I0120 16:41:25.008569 11442 graceful_termination.go:160] Trying to delete rs: 169.169.0.2:53/TCP/172.20.65.159:53 I0120 16:41:25.008617 11442 graceful_termination.go:171] Not deleting, RS 169.169.0.2:53/TCP/172.20.65.159:53: 0 ActiveConn, 12 InactiveConn I0120 16:41:25.008630 11442 graceful_termination.go:160] Trying to delete rs: 169.169.0.2:53/TCP/172.20.38.193:53 I0120 16:41:25.008696 11442 graceful_termination.go:171] Not deleting, RS 169.169.0.2:53/TCP/172.20.38.193:53: 0 ActiveConn, 12 InactiveConn I0120 16:41:25.008719 11442 graceful_termination.go:160] Trying to delete rs: 169.169.0.2:53/TCP/172.20.41.162:53 I0120 16:41:25.008766 11442 graceful_termination.go:171] Not deleting, RS 169.169.0.2:53/TCP/172.20.41.162:53: 0 ActiveConn, 11 InactiveConn I0120 16:41:25.008779 11442 graceful_termination.go:160] Trying to delete rs: 169.169.0.2:53/UDP/172.20.65.159:53 I0120 16:41:25.008828 11442 graceful_termination.go:171] Not deleting, RS 169.169.0.2:53/UDP/172.20.65.159:53: 0 ActiveConn, 13855 InactiveConn I0120 16:41:25.008840 11442 graceful_termination.go:160] Trying to delete rs: 169.169.0.2:53/UDP/172.20.41.162:53 I0120 16:41:25.008882 11442 graceful_termination.go:171] Not deleting, RS 169.169.0.2:53/UDP/172.20.41.162:53: 0 ActiveConn, 13920 InactiveConn I0120 16:41:25.222215 11442 service.go:309] Adding new service port "kube-system/kube-dns:dns" at 169.169.0.2:53/UDP I0120 16:41:25.222232 11442 service.go:309] Adding new service port "kube-system/kube-dns:dns-tcp" at 169.169.0.2:53/TCP I0120 16:41:25.222845 11442 proxier.go:714] Stale udp service kube-system/kube-dns:dns -> 169.169.0.2 I0120 16:41:25.327280 11442 proxier.go:1496] Bind addr 169.169.0.2 I0120 16:41:25.327413 11442 proxier.go:1559] new ep "169.169.0.2:53/TCP/172.20.38.193:53" is in graceful delete list I0120 16:41:25.327493 11442 proxier.go:1559] new ep "169.169.0.2:53/TCP/172.20.41.162:53" is in graceful delete list I0120 16:41:25.327563 11442 proxier.go:1559] new ep "169.169.0.2:53/TCP/172.20.65.159:53" is in graceful delete list I0120 16:41:25.334400 11442 proxier.go:1496] Bind addr 169.169.0.2 I0120 16:41:25.334502 11442 proxier.go:1559] new ep "169.169.0.2:53/UDP/172.20.38.193:53" is in graceful delete list I0120 16:41:25.334696 11442 proxier.go:1559] new ep "169.169.0.2:53/UDP/172.20.41.162:53" is in graceful delete list I0120 16:41:25.334769 11442 proxier.go:1559] new ep "169.169.0.2:53/UDP/172.20.65.159:53" is in graceful delete list I0120 16:41:55.182752 11442 proxier.go:1496] Bind addr 169.169.0.2 I0120 16:41:55.185431 11442 proxier.go:1496] Bind addr 169.169.0.2 I0120 16:42:25.323615 11442 proxier.go:1496] Bind addr 169.169.0.2 I0120 16:42:25.327466 11442 proxier.go:1496] Bind addr 169.169.0.2 I0120 16:42:55.453234 11442 proxier.go:1496] Bind addr 169.169.0.2 I0120 16:42:55.466214 11442 proxier.go:1496] Bind addr 169.169.0.2 I0120 16:43:25.597583 11442 proxier.go:1496] Bind addr 169.169.0.2 I0120 16:43:25.601359 11442 proxier.go:1496] Bind addr 169.169.0.2 I0120 16:43:55.766259 11442 proxier.go:1496] Bind addr 169.169.0.2 I0120 16:43:55.768480 11442 proxier.go:1496] Bind addr 169.169.0.2