24sama 这个service也是这样配置的。通过ipvsadm -L -n可以看到通过clusterIp的轮询配置了。
看配置是正确的,而且通过nodeport方式,通过主机IPv6地址和端口 [fd15:4ba5:5a2b:1008:5bbf:f87b:b3f7:dd1d]:31363
是可以访问到pod的,但是就是在集群内部通过clusterIp和端口[2001:db8:42:1::7e3d]:80
访问的时候,只有轮询到本节点上的pod的时候才能通,轮询到其他节点上的pod的时候就通不了,这个很奇怪
[root@m-192-168-239-132 ~]# ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP 192.168.239.132:31363 rr
-> 10.244.80.1:80 Masq 1 0 0
-> 10.244.198.1:80 Masq 1 0 0
-> 10.244.242.1:80 Masq 1 0 0
TCP 10.96.0.1:443 rr
-> 192.168.239.132:6443 Masq 1 2 0
-> 192.168.239.133:6443 Masq 1 1 0
-> 192.168.239.134:6443 Masq 1 1 0
TCP 10.96.0.3:53 rr
-> 10.244.177.1:53 Masq 1 0 0
-> 10.244.177.3:53 Masq 1 0 0
TCP 10.96.0.3:9153 rr
-> 10.244.177.1:9153 Masq 1 0 0
-> 10.244.177.3:9153 Masq 1 0 0
TCP 10.96.236.88:80 rr
-> 10.244.80.1:80 Masq 1 0 0
-> 10.244.198.1:80 Masq 1 0 0
-> 10.244.242.1:80 Masq 1 0 0
TCP 10.244.198.0:31363 rr
-> 10.244.80.1:80 Masq 1 0 0
-> 10.244.198.1:80 Masq 1 0 0
-> 10.244.242.1:80 Masq 1 0 0
UDP 10.96.0.3:53 rr
-> 10.244.177.1:53 Masq 1 0 0
-> 10.244.177.3:53 Masq 1 0 0
TCP [fd15:4ba5:5a2b:1008:5bbf:f87b:b3f7:dd1d]:31363 rr
-> [2001:db8:42:3:cd72:9fc4:393a:5000]:80 Masq 1 0 0
-> [2001:db8:42:29:6b93:3214:3a8b:3600]:80 Masq 1 0 0
-> [2001:db8:42:bc:152b:e0e1:f20c:c600]:80 Masq 1 0 0
TCP [2001:db8:42:1::7e3d]:80 rr
-> [2001:db8:42:3:cd72:9fc4:393a:5000]:80 Masq 1 0 0
-> [2001:db8:42:29:6b93:3214:3a8b:3600]:80 Masq 1 0 0
-> [2001:db8:42:bc:152b:e0e1:f20c:c600]:80 Masq 1 0 0
[root@m-192-168-239-132 ~]# curl -g [2001:db8:42:1::7e3d]:80
^C
[root@m-192-168-239-132 ~]# curl -g [2001:db8:42:1::7e3d]:80
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>
[root@m-192-168-239-132 ~]# curl -g [2001:db8:42:1::7e3d]:80
^C
[root@m-192-168-239-132 ~]# curl -g [2001:db8:42:1::7e3d]:80
^C
[root@m-192-168-239-132 ~]# curl -g [2001:db8:42:1::7e3d]:80
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>
[root@m-192-168-239-132 ~]#