k8s-multinode-cluster

goal:

To create the k8s-multinode cluster with one master node and multiple worker/slave nodes

pre-requisite:

  • Install ansible and configure the configuration file for it which is in /etc/ansible directory Refer this
  • If you have to launch the ec2-instance on AWS by ansible then the IAM user with Administrator Access should be created.
  • We need private key file with .pem extension to launch the ec2-instance. Take this file in your VM .
  • We should have boto or boto3 package installed to do something in AWS. Use this command pip3 install boto OR pip3 install boto3

Solution:

  • Download this directory in /etc/ansible/roles directory
  • Configure the configuration file which is in /etc/ansible directory Refer this
  • Create the yaml file for launching the ec2-instances on AWS. node.yml file

Don’t forget to add your access key and secret key of IAM user in this file

  • pip3 install boto OR pip3 install boto3 Install one of them which support to your OS.
  • Now download this yaml file in your working directory and run it using the command ansible-playbook node.yml .
  • And then the ec2-instance will launch on AWS
  • Check your public IPs and update it in this file. Don’t forget to update your private key file name also. This file should be in the /root directory as we give this path in the ansible conf file
  • Now download main yml file in working directory and run it by the command ansible-playbook main_setup.yml
  • Now kubernetes multinode cluster is setup

Thank you

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store