šŸ¢ Preparation: Pod CIDR

TheĀ firstĀ step is to select a new CIDR for pods. It must be distinct from all other CIDRs in use.

Let's check the CIDR used by Calico:

shell

copyrun

kubectl get installations.operator.tigera.io default\\
-ojsonpath='{.spec.calicoNetwork.ipPools[*].cidr}{"\\n"}'

Calico is using its default CIDR, which isĀ 192.168.0.0/16. In order to avoid conflicts, we will useĀ 10.244.0.0/16 —which is the usual default on Kind— as the pod CIDR for Cilium.

root@server:~# kubectl get installations.operator.tigera.io default \ -o jsonpath='{.spec.calicoNetwork.ipPools[*].cidr}{"\n"}' 192.168.0.0/16

šŸ’¼ Preparation: Encapsulation Protocol

TheĀ secondĀ step is to select a different encapsulation protocol (Geneve instead of VXLAN for example) or a distinct encapsulation port.

Check which encapsulation protocol Calico is using:

shell

copyrun

kubectl get installations.operator.tigera.io default\\
-ojsonpath='{.spec.calicoNetwork.ipPools[*].encapsulation}{"\\n"}'

Calico is usingĀ VXLANCrossSubnet. In order to avoid clashing with Calico's VXLAN port, we need to use VXLAN with a non-default port. Since the standard port isĀ 8472, let's useĀ 8473Ā instead.

kubectl get installations.operator.tigera.io default \ -o jsonpath='{.spec.calicoNetwork.ipPools[*].encapsulation}{"\n"}' VXLANCrossSubnet

⬢ Cilium Values for Migration

We have pre-created a Cilium Helm configuration fileĀ values-migration.yamlĀ based on the details above: