Cilium integration with Flannel (beta)

This guide contains the necessary steps to run Cilium on top of your Flannel cluster.

If you have a cluster already set up with Flannel you will not need to install Flannel again.

This Cilium integration with Flannel was performed with Flannel 0.10.0 and Kubernetes >= 1.9. If you find any issues with previous Flannel versions please feel free to reach out to us to help you.

Note

This is a beta feature. Please provide feedback and file a GitHub issue if you experience any problems.

Flannel installation

NOTE: If kubeadm is used, then pass --pod-network-cidr=10.244.0.0/16 to kubeadm init to ensure that the podCIDR is set.

  1. kubectl apply -f https://raw.githubusercontent.com/cilium/cilium/v1.8/examples/kubernetes/addons/flannel/flannel.yaml

Wait until all pods to be in ready state before preceding to the next step.

Cilium installation

Note

First, make sure you have Helm 3 installed.

If you have (or planning to have) Helm 2 charts (and Tiller) in the same cluster, there should be no issue as both version are mutually compatible in order to support gradual migration. Cilium chart is targeting Helm 3 (v3.0.3 and above).

Setup Helm repository:

  1. helm repo add cilium https://helm.cilium.io/

Deploy Cilium release via Helm:

  1. helm install cilium cilium/cilium --version 1.8.10 \
  2. --namespace kube-system \
  3. --set global.flannel.enabled=true

Set global.flannel.uninstallOnExit=true if you want Cilium to uninstall itself when the Cilium pod is stopped.

If the Flannel bridge has a different name than cni0, you must specify the name by setting global.flannel.masterDevice=....

Cilium might not come up immediately on all nodes, since Flannel only sets up the bridge network interface that connects containers with the outside world when the first container is created on that node. In this case, Cilium will wait until that bridge is created before marking itself as Ready.

Limitations

Flannel chaining lacks support of the following:

  • L7 policy enforcement