我正在尝试使用 calico cni 创建具有双栈 IPv4/IPv6 支持的多节点集群。以下是配置详情:
# for IPv4
master-node 192.168.122.163
worker-node 192.168.122.157
# for IPv6
master-node fd00:4000::1cd
worker-node fd00:4000::147
我使用以下命令创建了集群:
kubeadm init --apiserver-advertise-address=fd00:4000::1cd --pod-network-cidr=1100::/48,192.168.0.0/16 --service-cidr=fd00:100::/112,172.20.0.0/16 --feature-gates="IPv6DualStack=true"
我已经使用以下参数配置了 calico.yaml:
"ipam": {
"type": "calico-ipam",
"assign_ipv4": "true",
"assign_ipv6": "true"
},
IP6: autodetect
CALICO_IPV6POOL_CIDR: 1100::/48
FELIX_IPV6SUPPORT: true
在 kube-proxy 中设置 ipvs 模式之前,我可以使用 nodeport 32123 卷曲服务。但是在 kube-proxy 中设置 ipvs 模式后,我无法使用 nodeport 卷曲服务并得到以下错误:
curl -6 http://[fd00:4000::147]:32123 -g
curl: (7) Failed connect to fd00:4000::147:32123; Connection refused
以下是路线的详细信息:
#ip r
default via 192.168.122.1 dev eth0 proto static metric 100
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 blackhole 192.168.77.0/26 proto bird
192.168.77.1 dev calic79ff359580 scope link
192.168.77.2 dev cali520e698fdc9 scope link
192.168.77.3 dev calie981225789b scope link
192.168.122.0/24 dev eth0 proto kernel scope link src 192.168.122.163 metric 100
192.168.204.64/26 via 192.168.122.157 dev tunl0 proto bird onlink
#ip -6 r
unreachable ::/96 dev lo metric 1024 error -113 pref medium unreachable ::ffff:0.0.0.0/96 dev lo metric 1024 error -113 pref medium
1100::8188:7708:7a58:d338:4d00 dev calic79ff359580 metric 1024 pref medium
1100::8188:7708:7a58:d338:4d01 dev cali520e698fdc9 metric 1024 pref medium
1100::8188:7708:7a58:d338:4d02 dev calie981225789b metric 1024 pref medium blackhole 1100::8188:7708:7a58:d338:4d00/122 dev lo proto bird metric 1024 error -22 pref medium
1100::ff6c:c44e:2e86:9ed9:20c0/122 via fd00:4000::147 dev eth1 proto bird metric 1024 pref medium unreachable 2002:a00::/24 dev lo metric 1024 error -113 pref medium unreachable 2002:7f00::/24 dev lo metric 1024 error -113 pref medium unreachable 2002:a9fe::/32 dev lo metric 1024 error -113 pref medium unreachable 2002:ac10::/28 dev lo metric 1024 error -113 pref medium unreachable 2002:c0a8::/32 dev lo metric 1024 error -113 pref medium unreachable 2002:e000::/19 dev lo metric 1024 error -113 pref medium unreachable 3ffe:ffff::/32 dev lo metric 1024 error -113 pref medium
fd00:100::1 dev kube-ipvs0 proto kernel metric 256 pref medium fd00:100::a dev kube-ipvs0 proto kernel metric 256 pref medium
fd00:100::4611 dev kube-ipvs0 proto kernel metric 256 pref medium fd00:4000::1cd dev eth1 proto kernel metric 101 pref medium
fd00:4000::/64 dev eth1 proto ra metric 101 pref medium
fe80::/64 dev eth1 proto kernel metric 101 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev calic79ff359580 proto kernel metric 256 pref medium
fe80::/64 dev cali520e698fdc9 proto kernel metric 256 pref medium
fe80::/64 dev calie981225789b proto kernel metric 256 pref medium default via fe80::5054:ff:fe88:d08c dev eth1 proto ra metric 101 pref medium
有人对此有解决方案吗?