Selecting a container network interface
Review the following information for selecting a container network interface (CNI).
In Red Hat OpenShift on IBM Cloud version 4.20 and later, Calico is the default CNI, but clusters that use RHCOS worker nodes have the option of selecting Open Virtual Network (OVN) as their cluster CNI.
- Calico Default
- Calico is a single platform for networking, network security, and observability for any Kubernetes distribution in the cloud, on-premises, or at the edge. Whether you're just starting with Kubernetes or operating at scale, Calico's open source, enterprise, and cloud editions provide the networking, security, and observability you need. For more information, see Calico documentation.
- Open Virutal Network (OVN) 4.20 and later RHCOS worker nodes only
- Open Virtual Network (OVN) is an Open vSwitch-based software-defined networking (SDN) solution for supplying network services to instances. OVN provides platform-neutral support for the full OpenStack Networking API. With OVN, you can programatically connect groups of guest instances into private L2 and L3 networks. For more information, see the Red Hat documentation
Comparing Calico and OVN
Review the following table to compare the features and functionality of Calico and OVN.
If you plan to use OVN, you must ensure that your VPC subnets don't overlap with the additional subnets specified in the following table. If there is a subnet overlap, pod to pod networking will fail.
| Component | Calico | OVN-Kubernetes |
|---|---|---|
| Encapsulation |
|
|
| Default Cluster Network / Pod MTU | 1480 bytes (20 byte IPinIP header) by default. This can be changed. | 1400 bytes (100 byte Geneve header) by default. This can be changed. Daemonset needs to create NetworkManager file instead of just running ip link set dev ens3 mtu. You must also restart new worker nodes. |
| Pod IPAM | This is implemented by calico-ipam CNI and not by containers in the cluster. In use and free pod IPs and subnets are stored as Custom Resources in the cluster. Calico initially allocates each new node a /26 subnet (64 IPs, at least one
typically used as tunl0 IP, rest are available for pods). If all IPs in a /26 are used, then Calico assigns a second /26 subnet to the node. You can use the calicoctl ipam check to see subnets assigned to each node. The
calico-ipam CNI allocates pod IP to each new pod. |
|
| Pod to pod routing |
|
|
| Kubernetes network policies |
|
|
| Host network policies | Calico GlobalNetworkPolicies | None |
| Additional subnets | None |
|
| APIserver watches |
|
|
| CNI | The calico and calico-ipam CNI binaries are copied to each node by the install-cni initContainer on the calico-node pod. |
The ovnkube-node pod’s ovnkube-controller container executes the CNI binary for add and delete calls. |
| Namespaces, pods, and deployments created |
|
|
| Non-pod resources created | The calico CNI binary, calico-ipam CNI binary, and various other CNI binaries are copied to each node by install-cni initContainer on calico-node. |
|
| Connections between pods |
|
|