/K8s_cluster

we have automated the Kubernetes cluster using Ansible automation tool

Primary LanguageShell

Multi-Node K8s_cluster

we have automated the Kubernetes Multi-node cluster over AWS cloud using Ansible automation tool

Requirements:

  1. Python
  2. Ansible
    • To Install ansible run "pip3 install ansible" in your terminal
  3. AWS CLI

First Step: To create a kubernetes multi-node cluster We have to create instances over AWS EC2 and for that run EC2.yml playbook:

$ ansible-playbook -v EC2.yml

Fill the reqired parameters according to your requirement. you can find below screenshot as a example:

Screenshot 2021-04-07 at 3 35 57 PM

Now, it will launch 3 AWS ec2 instances one master and 2 slave.

NOTE: If you want to lauch more the 2 slave instances then you have to manually change main.yml file inside vars directory of Launch_Instance role and change instance_count from 2 to {as per your reqirement} inside Slave tag_list which is mention below.

Screenshot 2021-04-07 at 3 41 03 PM


Second Step: To Configure Instances as master and Slave we have to run cluster.yml playbook:

$ ansible-playbook -v cluster.yml

First, it will do the basic configuration we reqiured in both master and slave node.

Second, it will configure flannel network over master node. to do so we have to provide required output:{Find sceernshot below for reference}

Screenshot 2021-04-07 at 4 09 56 PM

Third, it will connect slave node to the master node to bulid cluster.

Fourth, it will create deployment over master node and to do so we have to provide required output:{Find sceernshot below for reference}

Screenshot 2021-04-07 at 4 15 01 PM


Find Demo Video Of This architechture over aws from below link:


Thank you for your time

Hope it is helpful for you