
Created Kubernetes Multi-Node Cluster on AWS Cloud …
Step 1: Create three Instances using RHEL v8 AMI ….

And the cluster min 2 CPU’s and 2GiB RAM per Instance … So , I chose “t3a.small“ and AWS charges $0.0188 per Hour … And then create one security group .. In that choose All Traffic rule … So that, in future we never face any issue in Connectivity … And give tag names respectively … And while creating Key-pair , download the key-pair for further usage ….

→ Login to three instances using ssh command in base OS …
→ set host name respectively by using cmd : “hostnamectl set-hostname <name> ” …

Step 2: Install docker in all three instances …. Here is the repo file for docker …

Command to install docker : “ yum install docker-ce — nobest ”
→ start the docker service using cmd →” systemctl start docker “
→ permanently enable the service → “ systemctl enable docker ”
→ We need to change the cgroupdriver to systemd in docker .. Here is the code … Note : we need to change cgroupdriver in all three instances …

→ Now restart the docker service using cmd : “ systemctl restart docker ”
Step 3: Download all required things for Cluster in all three instances …
→ creating kubernetes repo file for installing the required packages …
And set the SELINUX=permissive ,…. Then permanenetly enable Kubelet service …

→ start the kubelet service using cmd →” systemctl start kubelet”
After ruuning above cmd , u will face an error , coz of Flannel plugin (Step 4)
→ U can go through this link for the further details of kubernetes repo file…
→ Websiteforkubernetesrepo
Step 4: In master , We should download the Flannel plugin for clsuter…
The flannel manifest defines four things:
1. A ClusterRole and ClusterRoleBinding for role based acccess control (RBAC).
2. A service account for flannel to use.
3. A ConfigMap containing both a CNI configuration and a flannel configuration. The network in the flannel configuration should match the pod network CIDR. The choice of backend is also made here and defaults to VXLAN.
4. A DaemonSet to deploy the flannel pod on each Node. The pod has two containers 1) the flannel daemon itself, and 2) an initContainer for deploying the CNI configuration to a location that the kubelet can read.
→ Here is the command for downloading Flannel Plugins …
“ kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/k8s-manifests/kube-flannel-legacy.yml “
→ And also install iproute-tc : Linux Traffic Control utility. The Traffic Control utility manages queueing disciplines, their classes and attached filters and actions.
→ Here is the command for installing : “ yum install iproute-tc -y ”
→ Now restart the service kubelet cmd : “ systemctl restart kubelet ”
→That’s it, ur Master node is ready … Now coming to Slave nodes , they need to join in the cluster .. For joining follow Step 5….
Step 5: After successfully created cluster in master instance , at the last they provide the code to u as follows …

→The above code is diff for U … Copy your code & paste in Slave node 1 & 2 instances …. In the above code , the IP is mine .. Enter ur Internal IP ( not public IP ) of your master instance … U can get internal IP using the command : “ifconfig ”
→ After joining the cluster .. check whether all nodes are working or not using the cmd : “ kubectl get nodes ”
U can see all nodes with status : Ready …
Finally , Created Kubernetes Multi-Node Cluster ….
I any queries related to Multi-Node Cluster Connect to me on Linkedin ….
Thanks for reading …
…. Signing off ….