Installing a Kubernetes 1.11 Cluster On CentOS 7.5(1804) The Manual Way – Installing 3 Master Nodes, Etcd – Part 1

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Installing a 3 node(master) Kubernetes cluster on CentOS 7.5

Below I am going to show you how install, configure a 3 node multi-master Kubernetes 1.11 Cluster without using kubeadm, in addition I will also show you how to install/configure 2 worker nodes.

While there are many places describing the Kubernetes installation process, they mostly use the kubeadm utility. which is not officially support for a multi-master configuration. in the next few articles, I will be showing you how to configure a Kubernetes cluster manually without using the kubeadm utility.

Note: With the recent Kubernetes version(s) it is possible to install a multi-master cluster by using the kubeadm utility, however its still in beta and requires a few workarounds to make it work.

With that said, lets jump right in.

This is Part 1 – Installing and configuring kubernetes – Initial setup – bear-metal installation, configuration.

OS Installation / Configuration

To make it easier to understand the Kubernetes configuration, lets start first with a the Hostname / IP Address digram described below.

Hostname / IP Address diagram used in the below configuration

All the examples below use.

  1. Oracle VirtualBox to virtualize the Master and Worker nodes.
  2. CentOS(1804) as the Ber-Metal and Kubernetes VM’s.

The first steps is to Download a CentOS image. In my case I used CentOS 7.5 Minimal(CentOS-7-x86_64-Minimal-1804.iso), install that on your bare-metal server.

Note: If you are behind a corporate firewall or proxy, set the below in /etc/environment and in /etc/yum.conf.

Tip: For our configuration we do not need the Gnome desktop, If you would like to install the Gnome Desktop Just run the below.

Installing / Preparing Oracle VirtualBox for Kubernetes

Since I would like to use the most recent VirtualBox I will be downloading it directory from Oracle i.e using Oracles repo.

To install Oracle VirtualBox, just run the below.

Next, lets install a few VirtualBox pre-requisites.
Run all the below.

Once completed, reboot the server.

Next, install virtualbox by running the below.

Configuring VirtualBox networking to be used by Kubernetes VM’s

For Kubernetes master’s to work properly, communicated with each other we need to create/configure a VirtualBox managed network.

Just follow the below steps to do so.
Note: The steps below are only required for VirtualBox so that the Kubernetes hosts can communicate properly with each other. in a bear-metal configuration a similar configuration would be required on your regular switches.

Virtual Box host network manager

Virtual Box preferences > network

Virtual Box preferences > NAT

Virtual Box preferences > Port-forward (3 masters and 3 nodes)

Virtual Box VM > Network

To access any of the VirtualBox VM’s you can just ssh with the -p option, for example to access the first VM on port 2011, use the below.

In Part 2 will continue installing / configuring the Kubernetes VM’s and etcd.

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

avatar
  Subscribe  
Notify of