Task 23

Pjore
3 min readMay 12, 2021

Hello Guys 🙋‍♀️ In this article we are going to perform the following task.

Task Description:

🔰 Launch ec2-instance on AWS Cloud eg. for master and slave

🔰 Create roles that will configure 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 respective port

Let’s start the practical…….

In this practical first we need to launch three EC2-Instance one for Kubernetes Master and two for Kubernetes Slave.

For Configuring Kubernetes Cluster and launching EC2-Instances refer following article:

Configuration File:

Now we are going to launch a WordPress and Mysql database. for this purpose, I am going to create a role as K8S_Master_Wordpress

Now we are going to write a playbook for launching WordPress and Mysql

Your playbook folder should contain all above files

Lets run the playbook

master.yml

Our playbook has run successfully.

Lets check this on our Kubernetes Master Node

Lets check it through browser. type IP and Port Number

Its working fine. Our task completed succesfully.

Thanks For Reading😊😊😊

--

--