Deploy Wordpress GCP using GKE and Cloud SQL

Aditya Raj
4 min readOct 9, 2020

--

Task Description

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

Step 1: Create multiple projects namely developer and production.

First create the project developer

Now lets create the project production

Step 2: Create VPC network for both the projects

First let’s create the VPC for developer.

Similarly create VPC for production.

Also we have to create the firewall rue for both the VPC

First let’s create firewall rule for developer

Similarly we can create firewall rule for production.

Step 3: Create a link between both the VPC networks using VPC Peering

First create VPC peering from production VPC.

Again we have to do the same from developer VPC.

Now we can see that the status is also active from production VPC

Step 4: Create a Kubernetes Cluster in developer project

Step 5: Launch any web application with the Load balancer

First we will connect to kubernetes cluster using gcloud command.

Now launch wordpress application in kubernetes

Now we will create the Load Balancer

Step 6: Create a SQL server in the production project and create a database

Before creating the database let’s create an userin SQL

Now let’s create one database in the SQL

Step 7: Connect the SQL database to the web application launched in the Kubernetes cluster

Thank You!!

--

--

Aditya Raj

I'm passionate learner diving into the concepts of computing 💻