Installing, Configuring 3 Node Kubernetes(master) cluster on CentOS 7.5 – Installing and Configuring Flanneld, CNI and Docker – Part 3

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

Installing, configuring 3 node Kubernetes(master) cluster on CentOS 7.5 – Installing and configuring flanneld

In Part 2 I described how to install and configure the Kubernetes VM’s, below I am continuing with with the installation and configuration of Flanneld, CNI plugin and Docker.

This is Part 3 – Installing and configuring Flanneld, CNI plugin and Docker.

The first thing we are going to do, is grab the latest flanneld binary, you do so by running something like the below.

Note: For a list of the latest flanneld versions click here.

Make sure vXlan is enabled on your system, by running the below.
Note: Flannel uses vXlan as the encapsulation protocol.

Next, lets create the flanneld service
cat /usr/lib/systemd/system/flanneld.service

Next, modify /etc/sysconfig/flanneld something like the below.

Flannel CNI configuration

We are now going to add the CNI configuration.
First lets Download the latest CNI drivers, you do so by running the below.

Note: You can find the latest CNI releases here.

Next, lets create the CNI configuration directory

Create the the CNI network configuration file.

We are now ready to start flannel, you do so by running the below.

We are now ready to move on to the docker configuration.

Configuring the docker service(s).

Replace in /usr/lib/systemd/system/docker.service service like the below.

Create a docker socket service file.

Create a docker network file /etc/docker/daemon.json with the below content (replace with the ip of each node).
Note: Example below is taken from master1.

Now lets start the docker service.

In Part 4 will continue configuring the Kubernetes manifest and kubelet service.

You might also like – Other related articles to Docker and Kubernetes / micro-service.

Like what you’re reading? please provide feedback, any feedback is appreciated.

Leave a Reply

1 Comment threads
1 Thread replies
Most reacted comment
Hottest comment thread
2 Comment authors
Eli Kleinmancamer Recent comment authors
newest oldest most voted
Notify of

Hello Eli,

There is a line I got trouble with “/usr/bin/ln -sf /etc/kubernetes/cni/net.d /etc/cni/net.d” which gives me error “/usr/bin/ln: failed to create symbolic link ‘/etc/cni/net.d’: No such file or directory”,
Is there anything I am missing?