Multi Node Kubernetes Cluster

Multi Node Kubernetes Cluster

Here we are creating multi node kubernetes cluster by using one master and two slaves.

Step1:- Install rhel 8 in your virtual box and make the local repo of your machine.

No alt text provided for this image

Step2:- Install Docker and k8s and make the repo of them, then install them.

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

Step3:- Now , to run the k8s smoothly disable the firewall,selinux and change the cgroup driver from "cgroupfs" to "systemd" which is compatible with k8s

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

Step4: - In order to make multi node cluster work smoothly we need to disable the swapping.

No alt text provided for this image

after this install iproute-tc and check whether the iptables is set to 1 or not.

No alt text provided for this image
No alt text provided for this image

Step5: -Now we have successfully configured the one machine. To avoid same configuration to be done in another two machines we are cloning this machine to create two more machines

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

Step6:- now open all the three machines and set the hostname in three of them and check whether they are connected or not by pinging to each other .

also make the entry in the file /etc/hosts

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

Step7:- Now to configure master we need to initialize kubeadm in master node. Doing this will provide us a token which will be further used to add slaves to master. 

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image


No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

Step8: -Now to create a client to communicate to master, we need to provide a config file having client certificate and other important credential and also we need to copy our config file to root and can transfer it to client using WINscp, Apart from this you can directly transfer the file from .kube to client using Winscp without coping it to /root/.

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

Step9: - Go to client's cmd which is windows in our case, and go to the directory we copied the config file and now you can run your normal kubectl programs to create the docker container.

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

and finally run the IP of slave on your browser and you'll see the results

No alt text provided for this image


sagar gupta

Student at Bundelkhand University

4 年

Congrats????

回复
Aditya Gupta

AWS || AZURE || PYTHON || BIG DATA || TERRAFORM || KUBERNETES || SHELL SCRIPTING || POWERSHELL || LINUX

4 年

Great work

Shailly Shah

Software Developer | Full-Stack | .Net Core | Angular | Azure | SQL | Agile | 2x Azure Certified

4 年

Great ??

Akash Pandey

Cloud Architect ? 6X Azure ? 1X Databricks ? ACE Certified ? MCT

4 年

Good Work

要查看或添加评论,请登录

Srishti Jain的更多文章

  • Configuring Load Balancer on AWS using Ansible

    Configuring Load Balancer on AWS using Ansible

    Task Description: ??Provision EC2 instances through ansible. ?? Retrieve the IP Address of instances using the dynamic…

    2 条评论
  • Deploying Webserver on AWS using Ansible

    Deploying Webserver on AWS using Ansible

    This task involves the following steps: 1. Launching an EC2 instance.

    2 条评论
  • Deploying WordPress application on Kubernetes with AWS RDS using terraform

    Deploying WordPress application on Kubernetes with AWS RDS using terraform

    The Objective of the task was to 1.?Write an Infrastructure as code using terraform, which automatically deploy…

    13 条评论
  • Task 1 - Ansible

    Task 1 - Ansible

    STEPS TO DO THIS TASK : ?? Configure Docker ?? Start and enable Docker services ?? Pull the httpd server image from the…

    2 条评论
  • Objectives: -

    Objectives: -

    Perform the task-1 using EFS instead of EBS service on the AWS as, Create/launch Application using Terraform 1. Create…

    2 条评论
  • Creating a VPC using NAT Gateway and Integrating it with EC2

    Creating a VPC using NAT Gateway and Integrating it with EC2

    STEPS: 1. Write an Infrastructure as code using terraform, which automatically create a VPC.

    2 条评论
  • Creating VPC and integrating it with Ec2

    Creating VPC and integrating it with Ec2

    STEPS: 1) Write a Infrastructure as code using terraform, which automatically create a VPC. 2) In that VPC we have to…

    5 条评论
  • EKS TASK

    EKS TASK

    What is EKS? Amazon Elastic Kubernetes Service (Amazon EKS) is a managed service that makes it easy for you to run…

    11 条评论
  • Task 1: -

    Task 1: -

    1. Create the key and security group which allow the port 80.

    12 条评论

社区洞察

其他会员也浏览了