GCP Task-1

Problem Statement:

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

So, Let’s begin:

Step 1 : Create projects “Developer” and “Production”.

Step 2 : Create VPC and subnet for Wordpress.

Step 3 : Create VPC and subnet for mysql.

Step 4 : Set up VPC peering.

Step 5 : Create Kubernetes Cluster for Wordpress.

Step 6 : Configure kubernetes cluster using CLI.

gcloud container clusters get-credentials wordpress — region asia-southeast1 — project dev-789456

Check if kubernetes cluster is connected.

kubectl get nodes; kubectl get services

Step 7: Deploy Wordpress.

Kubectl create deployment myos1 — image=wordpress

Check deployment.

kubectl get pods

Step 8 : Create 3 replicas of wordpress.

kubectl scale deployment myos1 — replicas=3; kubectl get pods

Step 9 : Create Load Balancer.

kubectl expose deployment myos1 — type=LoadBalancer — port=80; kubectl get services


Step 10 : Create SQL server for database.

Step 11 : Add User in database.

Step 12 : Create database for wordpress “data”.

Step 13 : Wordpress Configuration.

That’s All Folks!!

Thanks everyone for reading, if you like it drop a like and comment.




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

Recommended from Medium

Importance of Software Design

You can start learning Python from level 0

ASP .NET Core with Docker: Beginers Guide

Use Git Bisect to Find the Commit That Introduced a Bug

Unigrams in Elasticsearch: Finding Words by Letter Frequency

Control Your Lighting in Unity Using Light Layers- Game Dev Series 164

Cubiex eSports launches V2.0 platform

How to Eat an Airplane: A Crash Course in Cloud

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
Manav Lohiya

Manav Lohiya

More from Medium

GCP Command Line - gcloud

IAC with Google Cloud Functions

How to Pass GCP Professional Cloud Developer

Schedule Google Cloud STS Transfer Job with Cloud Scheduler