Network provider research
provider | k8s version | k8s network policy | pros | cons | thoughoutput /%direct |
---|---|---|---|---|---|
flannel vxlan | >= 1.2 | no | 1) easy to configure 2) easy to span VLAN/datacenter |
1) Broadcast flood to 192.168.0.0/16 since no exact ip route setting. 2) performance downgrade 3) network isolation needs extra subnet mgt. efforts |
45% |
flannel host-gw | >= 1.2 | no | 1) easy to configure 2) no obvious performance downgrade |
1) To span multiple subnets in a vlan, need extra steps to add routing rules 2) can’t span multiple vlans, datacenters. 3) doesn’t support network policy 4) network isolation needs extra subnet mgt. efforts |
93% |
calico | >= 1.3 | yes | 1) bird agents configure routes with BGP on each node.2) flexible subnets expansiton with ip address pool mgmt 3) support k8s network policy 4) enable -ipip to support cross L2 VLAN. |
1) arch is complex, management of bird and felix, need higher learning carve for deployment, debugging, operation 2) when enabling -ipip , introduce additional packet encapsulation with significant performance downgrade. |
BGP:93% vs BGP+ipip:64% |
canal (calico + flannel vxlan) | >= 1.3 | yes | 1) support vxlan to cross L2. 2) Network policy support extended from Felix of calico. 3) smooth migration from existing flannel to calico |
1)significant performance downgrade due to packet encapsulation and broadcast flood. 2) Double complexity |
45% |
calico + IaaS IP address (SL portableIP) + hostAffirnity | >= 1.3 | yes | 1) consist network IP address space as IaaS env. 2) Network policy support. |
1) No L2 support to cross VLAN. 2) enable subnet of hostAffirnity and integrate application of ip address space from IaaS. |
93% |
Flannel
Summary of flannel over “vxlan” and “host-gw”
:star:
vxlan
is the default backend type of ubuntu k8s deployment. The container-to-container test result above (1.37 G/sec) performs ~50% of the raw host-to-host result (3.02 G/sec).
:star: “host-gw” leverage the kernel route table with “ip routes” to route traffic to target host. The container-to-container test result above (2.84 G/sec) performs ~93% of the raw host-to-host result (3.02 G/sec)
container to container over vxlan
|
|
container to container over host-gw
Calico
Summary of calico BGP and calico BGP+ipip
:star: “calico BGP(node to node mesh)” is similar to “host-gw”. about 93%+ performance of direct connection.
:star: “calico BGP +-ipip
(node to node mesh)” is similar to “vxlan”. it is about 64%+ performance of direct connection due to packet escapsulation, but it is better than “vxlan” without broadcast flood due to appropriate ip routes setting. Significant negative performance impact even for connection in the same VLAN.
BGP without ipip
host to host (in the same VLAN)
Container to container over BGP node to node mesh(same VLAN)
|
|
Container to container over BGP+-ipip
(same VLAN)
Container to container over BGP+-ipip
(cross VLAN)
|
|
host to host (cross vlan)
|
|
AWS VPC network
Summary of aws-vpc
:star: “aws-vpc” is similar to “host-gw”. about 93%+ performance of direct connection.
|
|
NetworkPolicy for isolation (TBD)
kubectl annotate ns gamestop "net.beta.kubernetes.io/network-policy={\"ingress\": {\"isolation\": \"DefaultDeny\"}}"
|
|