Deployment of WebApplication with Cloud SQL and GKE | Google Cloud Platform

Deployment of WebApplication with Cloud SQL and GKE | Google Cloud Platform


Hello !! Here is the article of GCP Workshop task .

❗ Task Description : ❗

1. Create two VPC Networks namely Developer and Production

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

3. Create a Kubernetes Cluster with developer VPC and launch any web application with the Load balancer

4. Create a SQL server with production VPC and create a database

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


Pre-Configuration :

No alt text provided for this image
  • Create a account in Google Cloud Platform and Register for free tier.
  • In my case I am using QwikLabs . QwikLabs is the service by google which provide resources to do hands-on practicles.

Virtual Private Cloud - VPC :

A virtual private cloud is an on-demand configurable pool of shared computing resources allocated within a public cloud environment, providing a certain level of isolation between the different organizations using the resources

  • VPC is Network As A Service Provide by any Cloud Computing Platform.When we create a project in GCP. They always create a default VPC and we can also create our own VPC with customized network cidr
  • Created two Network VPC in network cidr of 10.0.1.0/24 and 10.0.2.0/24

developer VPC :

  • developer VPC is in network cidr 10.0.1.0/24 and have 1 subnet dev-1a
No alt text provided for this image
No alt text provided for this image

production VPC :

  • developer VPC is in network cidr 10.0.2.0/24 and have 1 subnet prod-1a
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

VPC Peering :

  • Google Cloud VPC Network Peering allows internal IP Address connectivity across two Virtual Private Cloud (VPC) networks regardless of whether they belong to the same project or the same organization.
  • VPC Network Peering enables you to connect VPC networks so that workloads in different VPC networks can communicate internally. Traffic stays within Google's network and doesn't traverse the public internet.
No alt text provided for this image
  • First we have to peer from developer to production but Peering is inactive to make peering activate we have to create peering from developer vpc to production vpc and then we have to make a vpc peering from production to developer
  • click on add peering in production VPC
No alt text provided for this image
No alt text provided for this image

developer VPC :

No alt text provided for this image

Kubernetes :

No alt text provided for this image
  • Kubernetes is container orchestration Engine and used to manage containers
  • Created Kubernetes cluster in GCP. Google Kubernetes Engine is the managed Kubernetes service of GCP

Cluster Creation :

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
  • We can get gcloud command to create cluster at end for configuration we do in webUI
No alt text provided for this image
  • Wordpress and Drupal deployment with GKE and exposed the port on which webserver is running i.e 80 and type LoadBalancer.
  • The type Load Balancer in GKE uses the external load balancer of Google Cloud Platform
No alt text provided for this image

Cloud SQL :

  • Cloud SQL is a very popular, highly maintainable, and manageable database offered by GCP. It is available with MySQL, PostgreSQL, and SQL-Server as a backend engine. Cloud SQL offers the following features: Fully managed MySQL Community Edition databases in the cloud
  • Created database in production VPC in us-central1
No alt text provided for this image
No alt text provided for this image
  • Database is created and we have to add the cidr network range to access the database. I am allowing every IP and every port It's not good for security you can give some specific cidr range
No alt text provided for this image
  • we can connect to sql instance with IP address and user and password
No alt text provided for this image

Wordpress :

  • Collect the External IP address from kubernetes services
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image


Done this task under guidance of Vimal Daga Sir.In training of  GCP Workshop by Linux World Informatics Pvt Ltd.

Thank you Mr. Vimal Daga sir for your guidance to do this real use case as a Task with right approach and right education.

To view or add a comment, sign in

More articles by Siva Naik Kethavath 🌱

Insights from the community

Others also viewed

Explore topics