An easy way to bring up the Kubernetes Cluster using kubeadm for your test environment.
All the managed clusters GKE, AKS, and EKS on the cloud have only two states Start or Delete Clusters. Although AKS does provide an auto-shutdown choice, you still need to enable the script. And also you do not have the master node configuration at your end. In this article, we will install Kubernetes using kubeadm on virtual machines so that we can stop and restart the cluster at our convenience and not get billed during the stoppage time. Also, we have the master node and its configuration which we can tweak.
Let’s go over the installation of Kubernetes Cluster on a VM step-by-step.
Here I am assuming that you know the basics of Kubernetes. I am not going to go over the components of Kubernetes it’s architecture and functionality now. This is solely to install a Kubernetes cluster using “kubeadm” and to make life easier for people who want a cluster for their understanding/testing applications etc…
**Pre-requisites: **Steps 1 and 2 below applies to all the nodes in the cluster
Package requirements for the operating system:
2.1 Make sure you have installed the latest python version: Otherwise, follow the below steps to upgrade / fresh install of python
$ git pull https://github.com/rangapv/pyUpgrade.git
$ ls
py.sh
$ ./py.sh
2.2 Make sure you have docker installed correctly: Otherwise, follow the below steps for docker and docker-compose installs.
Note attempt section 2.1 and then 2.2
$ git pull https://github.com/rangapv/doker.git
$ ls
dock.sh
$ ./dock.sh
Let’s check if the installs are fine
$ python --version
Python 3.5.2
$ docker --version
Docker version 19.03.8, build afacb8b7f0
$ docker-compose --version
docker-compose version 1.25.5, build unknown
Once section 1 and section 2 of hardware and software needs are satisfied let’s jump into the Kubernetes installation.
Our Kubernetes Architecture will look similar to this. It is a simple 2 node cluster with One master and One Node. The networking is via flannel.
K8s Architecture courtesy @tsuyoshiushio
Let’s begin with the Master Node preparation:
I will name the Master as “kubeadm”. Setting up the Master requires us to install the k8s components, networking, and finally the dashboard for user access. Let’s go over this one-by-one and in this particular order.
#containers #devops #kubeadm #kubernetes #cloud-computing