Google Cloud Platform Project

Virtual Private Cloud

A virtual private cloud (VPC) 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.

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. I 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-1-a

Production VPC:

Similarly Production VPC is setup in network cidr 10.0.1.0/24 and have 1 subnet prod-1-a.

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.

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

Kubernetes :

  • 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 :

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.

Cloud SQL :

It’s 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.

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.

Wordpress :

So this is how we can Create a SQL server with production VPC and create a database and also Connect the SQL database to the web application launched in the Kubernetes cluster.

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

UniFi with Freeradius — Part 1: Setup Radius with MariaDB/MySQL

Install Golang Apple macOS M1 Silicon Chip

Whatsapp Cloud API: How to send WhatsApp messages from Python?

The basics of version control

Language list

Why Elixir should be your next language if you’re a Pythonista

Getting Started with Python Debugging Using a Debugger

The Full Stack Engineer

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
Maowow

Maowow

More from Medium

Introduction to Google Cloud Platform

Connecting MySQL Workbench to Google Cloud SQL (locally)

GCP IAM and Admin

My journey learning Google Cloud Platform