Project 1 on Google cloud platform (gcp)

# I have to create multiple projects namely developer and production and then add VPC network for both the projects then create a link between both the VPC networks using VPC Peering then create a Kubernetes Cluster in deveproject and launch any web application with the Load balancer then create a SQL server in the prodproject and create a database and atlast connect the SQL database to the web application launched in the Kubernetes cluster.

Google Cloud Platform

STEP 1

I have created multiple projects named devproject and prodproject.As we create multiple projects to give flexibility to the client users and company to seprate there billling account and give seprate space to their workers to work on convinently ,etc.

Creating Project1
Creating Project2

STEP 2

Linked both the projects with billing account.We have to link our projects with billing account to take the services served by google ,To every services there are many API(Application programming interface ) to give us services.

Linking both my projects with billing account

STEP 3

Created VPC network for both the projects .As we created Vpc network ,firewall will not allow other ip to enter our OS ..So we add one more firewall rule with 0.0.0.0/0 ip and port=80 to allow every ip to enter our OS and just take the services given by port no -80 in our OS ,so by default port no 80 gives the service of webserver but we can change it too by a small change in configuration file of the software which is allowing us to host our web server.

Creating VPC network in devproject
Adding a firewall rule in devproject
Adding a firewall rule in prodproject

STEP 4

Created a link between both the VPC networks using *VPC Peering*.Google provide us with two ip one public ip and 2nd private ip .As we know about public ip , private ip is something in which google provide us to use there network channel which is spread all over the world ,As it transfers our data safely and very fast .So an example to understand it more better , A Company development team is working on the data centre of region asia-southeast1(Jurong West,Singapore) in zone “b”and production team is working on the data centre of us-east1(Moncks Corner, South Carolina, USA) in zone “c” .So if they want to transfer there data which is very beneficial to the company they send it through private network provided by Google.

VPC peering for prodproject
Network channel of Google

STEP 5

Created a Kubernetes Cluster in devproject by adding three nodes in diffrent zones and launched wordpress on one of the deployment pod.Why deployment pod ?? it is because if by mistake a pod in which wordpress is launched is deleted then it launches a new pod with the same setting everything same ,then i made 5 more replicas of the pod to balance the load on the server …To balance the load on the server i had added Load Balancer service too and added load balancer on top of those 5 replicas .Here kubernetes works as a manager to manage everything.We have to configure Network setting and allow everyone to access port no 80 .

Creating cluster on devproject
Configuring Node setting
Configuring Networking
Adding Load Balancer to all the pods

STEP 6

Created a SQL server in the prodproject as sql service provides us with three more storage facilities MySQL ,PostgreSQL SQL Server …I moved further with MySQL service as i had to make a database so then i created an instance with password and then configured networking and created a database.

Three services given by SQL
Creating an instance in MySQL
Configuring Networkl

STEP 7

Connected the SQL database to the web application launched in the Kubernetes cluster.By ip of Load Balancer to the pods ,I opened wordpress and then added sql database name, then user name ie, root, then password of sql and then ip of sql instance .After the next page shows up we are connected …

Page after we are connected
Login and password to open wordpress
Dashboard of Wordpress

THANK YOU

Tech_lover