For information on deploying flannel manually, using the Kubernetes installer toolkit kubeadm, see Installing Kubernetes on Linux with kubeadm.
kubeadm is used, then pass
kubeadm init to ensure that the
podCIDR is set.
kubeadm has RBAC enabled by default so you must apply the
kube-flannel-rbac.yml manifest as well as the
kubectl apply -f kube-flannel-rbac.yml -f kube-flannel.yml
If you didn't apply the
kube-flannel-rbac.yml manifest, you'll see errors in your flanneld logs about failing to connect.
Failed to create SubnetManager: error retrieving pod spec...
If you forgot to apply the
kube-flannel-rbac.yml manifest and notice that flannel fails to start, then it is safe to just apply the
kube-flannel-rbac.yml manifest without running
kubectl delete -f kube-flannel.yaml first.
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel-rbac.yml
flannel manifest defines three things:
flannelconfiguration should match the pod network CIDR. The choice of
backendis also made here and defaults to VXLAN.
flannelpod on each Node. The pod has two containers 1) the
flanneldaemon itself, and 2) a container for deploying the CNI configuration to a location that the
When you run pods, they will be allocated IP addresses from the pod network CIDR. No matter which node those pods end up on, they will be able to communicate with each other.
Kubernetes 1.6 requires CNI plugin version 0.5.1 or later.