Procedure for switching CNI from Flannel to Cilium
-
Disable the
kube-proxymodule:d8 k apply -f - << EOF apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: kube-proxy spec: enabled: false EOF -
Enable the
cni-ciliummodule:d8 k create -f - << EOF apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: cni-cilium spec: version: 1 enabled: true settings: tunnelMode: VXLAN EOF -
Check that all Cilium agents are in the
Runningstatus.d8 k get po -n d8-cni-ciliumExample output:
NAME READY STATUS RESTARTS AGE agent-5zzfv 2/2 Running 5 (23m ago) 26m agent-gqb2b 2/2 Running 5 (23m ago) 26m agent-wtv4p 2/2 Running 5 (23m ago) 26m operator-856d69fd49-mlglv 2/2 Running 0 26m safe-agent-updater-26qpk 3/3 Running 0 26m safe-agent-updater-qlbrh 3/3 Running 0 26m safe-agent-updater-wjjr5 3/3 Running 0 26m -
Reboot master nodes.
-
Reboot the other cluster nodes.
If Cilium agents can’t reach the
Runningstatus, reboot the associated nodes. -
Disable the
cni-flannelmodule:d8 k apply -f - << EOF apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: cni-flannel spec: enabled: false EOF -
Enable the
node-local-dnsmodule:d8 k apply -f - << EOF apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: node-local-dns spec: enabled: true EOFOnce you enable the module, wait until all Cilium agents are in the
Runningstatus. -
Check that the switching of the CNIs was completed successfully.
Ensuring the CNI was successfully switched
To ensure the CNI switching from Flannel to Cilium was completed successfully, follow these steps:
-
Check the Deckhouse queue:
-
If using a single master node:
d8 platform queue list -
If using a multi-master installation:
d8 platform queue list
-
-
Check the Cilium agents. They must be in the
Runningstatus:d8 k get po -n d8-cni-ciliumExample output:
NAME READY STATUS RESTARTS AGE agent-5zzfv 2/2 Running 5 (23m ago) 26m agent-gqb2b 2/2 Running 5 (23m ago) 26m agent-wtv4p 2/2 Running 5 (23m ago) 26m -
Check that the
cni-flannelmodule has been disabled:d8 k get modules | grep flannelExample output:
cni-flannel 35 Disabled Embedded -
Check that the
node-local-dnsmodule has been enabled:d8 k get modules | grep node-local-dnsExample output:
node-local-dns 350 Enabled Embedded Ready