Dok Docs
Github Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

cni

Overview

The current DOK version only supports flannel/calico/multus. In the future development plan, more CNI plug-in options will be introduced.

Install

Deploying flannel in DOK is done by executing commands similar to kubectl apply -f fannel.yaml on the master0 node.

CNI

The similarities and differences of the different types of CNI are as follows:

  1. Overlay: rely on the tunnel to get through, not rely on the underlying network
  2. Routing: rely on routing to get through, partly rely on the underlying network
  3. Underlay: rely on the underlying network to get through, strongly rely on the underlying network

Flannel

Please refer to the chapter on Flannel.

Calico

  1. Calico currently only supports TCP, UDP, ICMP, and ICMPv6 protocols. If you use other four-layer protocols (such as NetBIOS protocol), it is recommended to use other overlay network implementations such as weave and native overlay.
  2. The communication is realized on the basis of three layers, and there is no encrypted packaging on the second layer, so it can only be used on private and reliable networks.
  3. Traffic isolation is implemented based on iptables, and the isolation rules that need to be generated are obtained from etcd, which has some hidden dangers in performance.

kube-ovn

The kube-ovn installation script has been built into the DOK installation package. Users can create a cluster without CNI and install it manually, or specify --cni to install kube-ovn as a network plug-in when creating a cluster.

multus posterior-install

If the network plug-in is not actively selected when the cluster is installed for the first time, flannel will be the default CNI. If you want to install the multi-NIC network plug-in multus after the cluster is created, you can use the following method. More detailed multus For testing, please refer to multus docs

# run on master0
kubectl -f /root/dok-release/network/multus-daemonset.yml

img.png

Switch CNI

The default network plugin is flannel. If you want to modify the network plugin after the cluster is created and the application is deployed, there is a certain risk.

Reference

  1. CNI