Google Cloud Platform Project

Project description:

Using GCP platform to create a load balancer with the help of a Kubernetes cluster and SQL server for a php site for two projects connected by VPC peering

Project Objective:

1. Create multiple projects namely developer and production

2. Create VPC network for both the projects

3. Create a link between both the VPC networks using VPC Peering

4. Create a Kubernetes Cluster in developer project and launch any web application with the Load balancer

5. Create a SQL server in the production project and create a database

6. Connect the SQL database to the web application launched in the Kubernetes cluster

Services and technologies used:

· Google Cloud Platform Console

· Compute Engine

· Virtual Private Cloud

· Firewall

· Google Cloud Engine

· Google Kubernetes Engine

· Structured Query Language

· Load balancer

· Identity and Access Management

Process:

STEP 1: Create two projects say, “devproject” and “prodproject”

STEP 2: Create a new instance

The instance in devproject is set up as a CentOS 7 in asia-southeast-1 region (Singapore).

The instance in prodproject is set up as a CentOS 7 in us-east-1 region (South Carolina).

STEP 3: Create firewall rule

Allow Ingress for all IP ranges (0.0.0.0/0) for the tcp: 80 port

STEP 4: Setup VPC sub network

The sub network for the devproject instance be set up in us-east-1 and that for prodproject instance in asia-southeast-1 region

STEP 5: VPC peering

Apply for VPC peering from both the projects to each other to enable the systems to be connected.

STEP 6: Use GKE to setup a Kubernetes cluster

Add a node to the devproject and create a Kubernetes cluster in 3 zones.

STEP 7: Load balancer

Use kubectl.exe from the command prompt connected to the devproject to do horizontal scaling of pods and use deployment to setup a load balancer

STEP 8: SQL database

Setup a SQL database in the prodproject using the Storage services of GCP and add a database to it. Add user to it to enable update into the database.

STEP 9: Wordpress image setup

Setup the Wordpress image using kubectl.exe and attach the load balancer to it.

STEP 10: IAM services

Use defined set of roles or customized roles to give access to the prodproject as other users through Google account

Conclusions:

The Google Cloud Platform can be used to manage and cater to clients from all across the world without having physical offices in all the destinations.

--

--

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