Deploying WordPress by Integrating Google Cloud Platform With Kubernetes, Mysql✌
TASK OVERVIEW
- Create multiple projects namely dev and prod
- Create a VPC network for both the projects
- Create a link between both the VPC networks using VPC Peering.
- Create a Kubernetes Cluster in the developer project and launch any web application with the load balancer.
- Create a SQL server in the production project and create a database.
INTRODUCTION:
Before stepping into task lets get an overview about ✨GOOGLE CLOUD PLATFORM
WHAT IS GCP🤔
Google has its cloud service, it is a platform which provides all resources!
GCP provides a lot of resources, in this task, we are going to use Compute Engine, Kubernetes engine, Database, Networkservices
We can use GCP in WebUI, cli. GCP also provides a cloud shell
Google Cloud Platform (GCP), offered by Google, is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products, such as Google Search, Gmail, file storage, and YouTube. Alongside a set of management tools, it provides a series of modular cloud services including computing, data storage, data analytics, and machine learning.
LET’S GET INTO TASK👻
Step1:
I have created two projects — dev project,produproject
After creating projects I have enabled billing, compute engine API, Kubernetes API
Step2-
I have created vpc in both projects
we have created two vpc’s but we are going to deploy the cluster in one vpc and database in another vpc so there should be a connection between vpc’s
So I have done vpc peering for these two vpc’s
Step3-
now I have created a Kubernetes cluster in dev project
Now I have connected this cluster to our base os command prompt
I have launched a pod with httpd image and I have exposed this pod so that a load balancer is created
When we expose the pod it automatically creates a LoadBalancer
So I used SQL (MYSQL) service in GCP
Our WordPress is done 🥳we have to create a database and use in WordPress
I have created an MYSQL database in prodproject
Final Output:
search the load balancer IP in google then we can access to our WordPress
Now give Mysql instance credentials
Our MySQL instance is connected with the WordPress ✌
Thanks for reading 👻