cloud-barista / cb-ladybug

Cloud-Barista Multi-Cloud Application Runtime Framework : Support Multi-Cloud Kubernetes Service
Apache License 2.0
11 stars 11 forks source link

feat: add network cni calico #133

Closed joowons closed 2 years ago

joowons commented 2 years ago

Tested with

itnpeople commented 2 years ago

Calico(vxlan) Cross-CSP 설치 검토

검토 배경

해당 PR에서 Calico 설치 문제 없으나 Cross-CSP 환경에서 노드간 통신이 안되는 현상이 발견되어 수동 설치 테스트를 진행

검토 환경

설치 현황 -> 노드 간 통신 불가.

# 노드 #1 (AWS, 54.64.9.64/192.168.10.28)
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         _gateway        0.0.0.0         UG    100    0        0 eth0
10.244.122.0    0.0.0.0         255.255.255.0   U     0      0        0 *
10.244.122.1    0.0.0.0         255.255.255.255 UH    0      0        0 calia9693f7b251
10.244.124.0    10.244.124.0    255.255.255.0   UG    0      0        0 vxlan.calico
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
_gateway        0.0.0.0         255.255.255.255 UH    100    0        0 eth0

# 노드 #2 (GCP, 35.189.140.156/192.168.29.28)
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         _gateway        0.0.0.0         UG    100    0        0 ens4
10.244.122.0    10.244.122.0    255.255.255.0   UG    0      0        0 vxlan.calico
10.244.124.0    0.0.0.0         255.255.255.0   U     0      0        0 *
10.244.124.1    0.0.0.0         255.255.255.255 UH    0      0        0 cali140ea26fc35
10.244.124.2    0.0.0.0         255.255.255.255 UH    0      0        0 cali4ab1529590f
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
_gateway        0.0.0.0         255.255.255.255 UH    100    0        0 ens4
# 노드 #1 (AWS, 54.64.9.64/192.168.10.28)
ping 10.244.124.1

# 노드 #2 (GCP, 35.189.140.156/192.168.29.28)
ping 10.244.122.1

네트워크 및 라우팅 체크

# 노드 #1 (AWS, 54.64.9.64/192.168.10.28)
8: vxlan.calico: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 8951 qdisc noqueue state UNKNOWN mode DEFAULT group default
    link/ether 66:f6:10:93:e0:06 brd ff:ff:ff:ff:ff:ff promiscuity 0
    vxlan id 4096 local 54.64.9.64 dev eth0 srcport 0 0 dstport 4789 nolearning ttl inherit ageing 300 udpcsum noudp6zerocsumtx noudp6zerocsumrx addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

# 노드 #2 (GCP, 35.189.140.156/192.168.29.28)
9: vxlan.calico: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1410 qdisc noqueue state UNKNOWN mode DEFAULT group default
    link/ether 66:09:ac:35:3b:2d brd ff:ff:ff:ff:ff:ff promiscuity 0
    vxlan id 4096 local 35.189.140.156 dev ens4 srcport 0 0 dstport 4789 nolearning ttl inherit ageing 300 udpcsum noudp6zerocsumtx noudp6zerocsumrx addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
# 노드 #1 (AWS, 54.64.9.64/192.168.10.28)
10.244.124.0 dev vxlan.calico lladdr 66:09:ac:35:3b:2d PERMANENT
66:09:ac:35:3b:2d dev vxlan.calico dst 35.189.140.156 self permanent

# 노드 #2 (GCP, 35.189.140.156/192.168.29.28)
10.244.122.0 dev vxlan.calico lladdr 66:f6:10:93:e0:06 PERMANENT
66:f6:10:93:e0:06 dev vxlan.calico dst 54.64.9.64 self permanent

노드 #2 (GCP, 35.189.140.156/192.168.29.28)

9: vxlan.calico: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1410 qdisc noqueue state UNKNOWN mode DEFAULT group default link/ether 66:09:ac:35:3b:2d brd ff:ff:ff:ff:ff:ff



### flannel vxlan 설정과 비교

* 위에서와 같이 calico 의 경우 vxlan iface "vxlan.calico" 에  공인IP로 지정되어 있으나 flannel vxlan 환경에서 vxlan iface "flannel.1" 는 사실IP로 지정되어 있음 확인
itnpeople commented 2 years ago

Calico 설치 및 Ping 테스트 결과

CSP 라우팅 IPv4Address 설치 ping 비고
Cross-CSP VXLAN private-ip O X
Cross-CSP VXLAN public-ip O X
Cross-CSP BGP private-ip X . calico/node 컨테이너가 시작되지 못함 ( 0/1 Running)
Cross-CSP BGP public-ip X . (상동)
Single-CSP VXLAN private-ip O O
Single-CSP VXLAN public-ip O X
Single-CSP BGP private-ip O O
Single-CSP BGP public-ip X . calico/node 컨테이너가 시작되지 못함 ( 0/1 Running)

결론 (권장)

새부참조