• Deploy web app on Azure App service
  • Use Azure registry Container for deployment.
  • Provision using terraform.
  • Azure account
  • Azure CLI configured in OS

First, we need to create one docker image and push it to the Azure Container registry, and after write terraform code for provision.

Problem Statement:

  • Here We need to configure K8s Multi-Node Cluster on Multi-Cloud.
  • For Multi-Cloud I am using AWS, Azure.
  • AWS for 1 master, 1 Node.
  • Azure for 1 Node.


  • Have an AWS account
  • Have an Azure account
  • AWS CLIv2 installed and configured
  • Azure CLI installed and configured

Step-1)Launching Instances in AWS Azure

  • Let’s write code for this

  • Docker installed in OS.

For solving this issue I am showing two methods, the first is manually and the second is Automation, btw I prefer automation 😁.

First Method(Manual)

  • Pull one image(eg-centos).
docker pull centos
  • Start docker container normally.
docker run --net=host -it --name c1 centos
  • Install one GUI application for eg…

  • Launch ec2-instances on AWS Cloud eg. for master and slave.
  • Create roles that will configure the master node and slave node separately.
  • Launch a wordpress and MySQL database connected to it in the respective slaves.
  • Expose the wordpress pod and the client able to hit the wordpress IP with its…

Problem Statement

Ansible Roles to Configure K8S Multi-Node Cluster over AWS Cloud.


For this problem statement, I am using the Ansible collection, in this ansible collection I am creating 3 roles, one for ec2, the second for Kubernetes master, third for Kubernetes slave 🙂.


  • Ansible installed in OS.
  • Dynamic Inventory configured.
  • AWS…


  • Ansible Installed
  • Inventory Configured
  • AWS CLIv2 installed and Configured

Step-1)Configuring Dynamic inventory

  • Here I am using dynamic inventory because we have to configure minikube in ec2 instance.
  • For the dynamic inventory, download ec2.py and ec2.ini from this given URL, and paste in the inventory folder:
  • Now add this path in ansible.cfg
  • After…


  • 3 VM(Virtual Machine).

First, we need to delete all the IP addresses from all the OS routing tables. after that add the System A Ip in System B and System C routing table, at last, add the System B and System C Ip in System A routing table. …

Prerequisite :

  • Ansible installed.
  • Inventory configured.

Step-1)Retreive the distro.

  • First, we need to retrieve the distribution from ansible facts after use it.
  • After we retrieve the distro, now we need to make the files respective to the distro, like — RedHat-8.yml, Ubuntu-16.yml, etc.

Step-2)Writing Playbook

  • First, we need to make the playbook for the distro.

Ritesh Singh

DevOps/Cloud Enthusiast

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