# 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.
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.
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.
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.
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.
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 .
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.
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 …