lentil1016 / kubeadm-ha

Deprecated! Boot a ha kubernetes 1.11.0/1.12.1/1.13.0/1.14.0 cluster with kubeadm.
GNU General Public License v3.0
214 stars 128 forks source link

项目中LVS的问题请教下 #25

Closed aq2cn closed 6 years ago

aq2cn commented 6 years ago

ipvsadm -Ln IP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags -> RemoteAddress:Port Forward Weight ActiveConn InActConn TCP 10.96.0.1:443 rr -> 192.168.43.11:6443 Masq 1 1 0
-> 192.168.43.12:6443 Masq 1 0 0
-> 192.168.43.13:6443 Masq 1 3 0
TCP 10.96.0.10:53 rr -> 10.233.0.2:53 Masq 1 0 0
-> 10.233.1.2:53 Masq 1 0 0
TCP 10.98.26.247:80 rr -> 192.168.43.11:8080 Masq 1 0 0
-> 192.168.43.12:8080 Masq 1 0 0
-> 192.168.43.13:8080 Masq 1 0 0
TCP 10.99.198.122:443 rr -> 10.233.1.5:8443 Masq 1 0 0
TCP 10.100.48.93:80 rr -> 10.233.1.4:8082 Masq 1 0 0
TCP 10.100.136.4:5473 rr TCP 10.105.169.229:80 rr -> 10.233.2.2:3000 Masq 1 0 0
TCP 10.107.12.250:8083 rr -> 10.233.2.2:8083 Masq 1 0 0
TCP 10.107.12.250:8086 rr -> 10.233.2.2:8086 Masq 1 0 0
UDP 10.96.0.10:53 rr -> 10.233.0.2:53 Masq 1 0 0
-> 10.233.1.2:53 Masq 1 0 0 项目中LVS我的疑问是,LVS DR模式,要同网段IP和同端口来转发,但是项目中LVS的IP不是同网段和同端口也能转发,这是如何实现的呢?请教下,如果知道,请回复下,谢谢

ppabc commented 6 years ago

貌似LVS用的不是 DR模式,kube-proxy ipvs 是基于 NAT 实现的,具体请看 Google 文档

lentil1016 commented 6 years ago

这篇文章有可能能解答你的疑惑,如果没有其他疑惑,可以关闭这个问题