Kubernetes Views 4

Installing the Flannel CNI on Kubernetes

Installing the Flannel CNI on Kubernetes image 1

On Kubernetes you have to install a CNI so that pods can communicate inside the cluster.

If you first stand up Kubernetes, you end up in an environment like the following.

kubectl get pods
kubectl get pods -A
Installing the Flannel CNI on Kubernetes image 2

coredns is in the ContainerCreating state. In that case, once you install a CNI it will change to Running.

kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml

You can install it immediately with that command, but in the case above, if the cluster is running on a second CNI network, errors can occur.

wget https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml


Then edit the kube-flannel.yml file (add --iface-regex).

Installing the Flannel CNI on Kubernetes image 3

After editing it, apply it.

kubectl apply -f kube-flannel.yml

Reactions

Comments 0

A nickname and a password are required. The same password edits or deletes the comment later. Comments appear after a review.

Comments appear after a review. The password is used again to edit or delete.