calico网络 包含 overlay  和 underlay网络

overlay   IPIP和VXLAN模式,  IPIP可以使用BGP协议, VXLAN不能使用BGP协议, 可以跨网段,建立隧道

underlay BGP模式, 必须同一个C网

 

calico ipip 变更 BGP 配置

 

 

1、修改ippool,需要把ipipMode从Always修改成为Never(执行下面命令修改ipipMode)

[root@k8s-master1 target]# kubectl edit ippool
ipipMode: Never

 

2. 关闭 ipip模式, 定义asnumber 自治网络号

cat << EOF | calicoctl create -f -
 apiVersion: projectcalico.org/v3
 kind: BGPConfiguration
 metadata:
   name: default
 spec:
   logSeverityScreen: Info
   nodeToNodeMeshEnabled: false
   asNumber: 64512
EOF

 

3.  指定反射器地址

cat << EOF | calicoctl create -f -
apiVersion: projectcalico.org/v3
kind: BGPPeer
metadata:
  name: bgppeer-global-55
spec:
  peerIP: 192.168.15.1
  asNumber: 64512
EOF

 

 交换机配置

calico ipip 变更 BGP 配置

 

 

calico ipip 变更 BGP 配置

 

 

Calico 关闭 natOutgoing 配置

 在 Dubbo 应用生产容器化过程中,生产环境 Zookeeper 对单个 IP 连接限制数比节点上 Pod 数小,导致节点上容器里的 Dubbo 应用经常会出现连接 Zookeeper 被拒绝的问题。再因为容器网络和物理网络已经打通,通过 calico 配置 natOutgoing 参数为 false,

[root@master1 ~]# kubectl edit  ippool default-ipv4-ippool -o yaml

apiVersion: crd.projectcalico.org/v1
kind: IPPool
metadata:
  name: default-ipv4-ippool
spec:
  blockSize: 26
  cidr: 192.168.56.0/24
  ipipMode: Never
  natOutgoing: false
  nodeSelector: all()
  vxlanMode: Never

 

 

 

 

参考:

https://blog.csdn.net/M2l0ZgSsVc7r69eFdTj/article/details/106561069

https://www.cnblogs.com/dengcongcong/p/7066894.html

相关文章:

  • 2022-01-10
  • 2021-10-10
  • 2022-01-24
  • 2021-07-10
  • 2021-06-16
  • 2022-01-10
猜你喜欢
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2022-02-13
  • 2022-12-23
  • 2022-01-22
相关资源
相似解决方案