标签:适合 ubuntu str mes table 安装文档 cto select pre
在Calico Overlay网络中有两种模式可选(仅支持IPV4地址)
两种模式均支持如下参数
在默认情况下,默认的 ipPool 启用了 IPIP 封装(至少通过官方安装文档安装的 Calico 是这样),并且封装模式为 Always
;这也就意味着任何时候都会在原报文上封装新 IP 地址,在这种情况下将外部流量路由到 RR 节点,RR 节点再转发进行 IPIP 封装时,可能出现网络无法联通的情况(没仔细追查,网络渣,猜测是 Pod 那边得到的源 IP 不对导致的);此时我们应当调整 IPIP 封装策略为 CrossSubnet
导出 ipPool 配置
1
|
calicoctl get ippool default-ipv4-ippool -o yaml > ippool.yaml
|
修改 ipipMode
值为 CrossSubnet
1
|
apiVersion: projectcalico.org/v3
|
重新使用 calicoctl apply -f ippool.yaml
应用既可
- name: CALICO_IPV4POOL_IPIP value: "Always"
root@ubuntu:~# ./calicoctl node status Calico process is running. IPv4 BGP status +--------------+-------------------+-------+----------+-------------+ | PEER ADDRESS | PEER TYPE | STATE | SINCE | INFO | +--------------+-------------------+-------+----------+-------------+ | 10.10.16.47 | node-to-node mesh | up | 08:24:07 | Established | | 10.10.16.81 | node-to-node mesh | up | 10:59:49 | Established | +--------------+-------------------+-------+----------+-------------+ IPv6 BGP status No IPv6 peers found. root@ubuntu:~# ./calicoctl get node NAME bogon cloud ubuntu root@ubuntu:~#
改为
- name: CALICO_IPV4POOL_IPIP value: "Never"
root@ubuntu:~# ./calicoctl get node NAME bogon cloud ubuntu root@ubuntu:~# ./calicoctl node status Calico process is running. None of the BGP backend processes (BIRD or GoBGP) are running. root@ubuntu:~# ./calicoctl node status Calico process is running. IPv4 BGP status +--------------+-------------------+-------+----------+--------------------------------+ | PEER ADDRESS | PEER TYPE | STATE | SINCE | INFO | +--------------+-------------------+-------+----------+--------------------------------+ | 10.10.16.81 | node-to-node mesh | up | 02:14:59 | Established | | 10.10.16.47 | node-to-node mesh | start | 02:15:02 | Active Socket: Connection | | | | | | closed | +--------------+-------------------+-------+----------+--------------------------------+ IPv6 BGP status No IPv6 peers found. root@ubuntu:~#
root@ubuntu:~# ./calicoctl node status Calico process is running. IPv4 BGP status +--------------+-------------------+-------+----------+-------------+ | PEER ADDRESS | PEER TYPE | STATE | SINCE | INFO | +--------------+-------------------+-------+----------+-------------+ | 10.10.16.81 | node-to-node mesh | up | 02:15:22 | Established | | 10.10.16.47 | node-to-node mesh | up | 02:15:10 | Established | +--------------+-------------------+-------+----------+-------------+ IPv6 BGP status No IPv6 peers found. root@ubuntu:~#
全互联模式(node-to-node mesh)
??全互联模式,每一个BGP Speaker都需要和其他BGP Speaker建立BGP连接,这样BGP连接总数就是N^2,如果数量过大会消耗大量连接。如果集群数量超过100台官方不建议使用此种模式。
路由反射模式Router Reflection(RR)
??RR模式中会指定一个或多个BGP Speaker为RouterReflection,它与网络中其他Speaker建立连接,每个Speaker只要与Router Reflection建立BGP就可以获得全网的路由信息。在calico中可以通过Global Peer实现RR模式。
标签:适合 ubuntu str mes table 安装文档 cto select pre
原文地址:https://www.cnblogs.com/dream397/p/14917354.html