Configuring Kubernetes 3 Node Cluster On CoreOS Etcd, Flannel – Part 2

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

In the last post I went through how to generate the SSL certificates, below I am continuing with the Etcd configuration.

I divided the Kubernetes configuration into parts outlined below (still working progress).

Note: An up-to-date example is available on my GitHub project page, or generate your own Kubernetes configuration with the Kubernetes generator available here on my GitHub page.

This is part 2 – Configure Etcd key value store – Flannel networking

Note: The etcd version used in the below config is version 3.
In order for Etcd communication to work we will have to copy the certificates create in part 1 since all communication is configured to use SSL.

Etcd configuration

Create the required directory, and copy the CA and etcd certificates.

If using the ignition config, add the below to your ignition file.

To configure etcd, like all other components. you have two options. option one: to use the below systemd configuration files by creating it manually at any time, option two: you can generate at installation an ignition config, by using the CoreOS ignition file.

I am including both examples below.
Note: Replace with the right ip address on each of the 3 nodes.
Manually creating the config files
cat /etc/systemd/system/etcd-member.service.d/20-clct-etcd-member.conf

cat /etc/systemd/system/etcd-member.service.d/conf1.conf

Using the ignition config at install time
Add the below to your ignition config.

Loading / enabling the service.

To verify cluster health just run the below.

Tip: You can omitted the endpoints and certificates if the environment variables are set properly.
Just add the below to your /etc/environment.

Or add to your ignition config.
Note: The below config contains extra variables, only the ETCDCTL_ are needed.

Flannel configuration

Same as etcd flannel can also be configured manually or with an ignition config.

Below is the ignition config

To create the flannel config manually, create the below files.
/etc/systemd/system/flanneld.service.d/20-clct-flannel.conf

/etc/systemd/system/flanneld.service.d/40-ExecStartPre-symlink.conf

/etc/systemd/system/flanneld.service.d/50-network-config.conf

/etc/systemd/system/flanneld.service.d/50-ssl.conf

Loading / enabling the service.

To verify flannel working just check the etcd configuration

You are now ready to move to the next step, Configuring Kubernetes manifests – in part 3.

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

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

Leave a Reply

avatar
  Subscribe  
Notify of