𝗛𝗲𝗹𝗹𝗼 Friends !! Welcome you all to my article on Deployment of WordPress Web Application by Integrating Google Cloud Platform with Kubernetes. An overview of Kubernetes and GCP Service With WordPress will also be present. Finally How can we utilize Terraform with GCP and Kubernetes for webserver deployment? We are also utilizing or building WordPress to create this application, as well as Deployment of Web Application on Kubernetes. Deployment Deployment of WordPress Web Application by Integrating Google Cloud Platform with Kubernetes.
PROJECT DESCRIPTION :
- Create multi projects with dev and prod
- Make VPC network for dev project
- Create VPC network for prod project
- Connect both the VPC network with VPC peering
- Create a Kubernetes Cluster in dev project and launch a wordpress/Joomla application with the Load balancer
- Create a SQL server in prod project and create a database
- Connect the SQL database with the application launched in the K8s cluster
PROJECT COMPLETION :
This project is based on deployment of WordPress application using Integration of Google Cloud Platform and Kubernetes by Google Kubernetes Engine .
☁ Google Cloud Platform ☁
Google Cloud Platform (GCP) is a set of cloud computing services supplied by Google that run on the same infrastructure as Google’s internal products, such as Google Search, Gmail, and YouTube.
- Any type of infrastructure built on Google Cloud Platform must be done as part of a project. So, for both development and production platforms, I built a single project called cloudproject.
2)As part of this project, we will need to set up two VPCs (Virtual Private Clouds)
, one for WordPress deployment and the other for MySQL Database Instance. I named these VPCs VPC1 in the US-central1 region and VPC2 in the US-east1 region, respectively. We must construct a subnet for networking activities of the instances within VPC. Another thing we need to do is add a firewall rule that lets all traffic into the VPC as an Ingress Rule.
–>Creating firewall rule for Ingress traffic :
–> Creating VPC network for development and production platforms :
3)We must utilise GCP’s VPC Peering service to join these VPCs.
We must build VPC peers for both VPC1 and VPC2 as peer1 and peer2 in order to peer the VPCs.
4) Now, VPC peering has connected both VPCs.
Then, for the deployment of the WordPress application, we also built a Kubernetes master slave architecture, or cluster. Because Google Cloud Platform delivers Kubernetes As A Service via Google Kubernetes Engine, we don’t need to construct our own cluster or configure master and all that for kubernetes. To also use the Google Kubernetes Engine service, we only need to provide them with the Node Pool specs. Then they assume full responsibility for the creation of a Kubernetes cluster as well as cluster administration.
–> Creating Kubernetes Cluster for development platform in VPC1 :
–>Specifying node information for kubernetes cluster :
—>Cluster Created Successfully
5)We must contact Google Kubernetes Engine in order to install the WordPress application in a kubernetes cluster.
To connect with the Kubernetes master, which sends additional tasks to its slave nodes, we need to configure the kubectl application in our system.
In this situation, we’re utilising Google Cloud Platform, which offers Kubernetes As A Service (KaaS) via Google Kubernetes Engine, and we’ll need to contact GCP from our system to get started.
To do so, we’ll need to install the Google Cloud SDK Shell Program on our PC, which will give us with all of the GCP commands we’ll need to access Google Cloud.
–> Log in to Google Cloud Platform using Google Cloud SDK :
gcloud auth login
––> Use of Google Cloud Native Commands :
To interface with a Google Cloud kubernetes cluster, we must alter the kubeconfig file so that the kubectl programme can communicate with Google Kubernetes Engine.
To see the node information use command :
kubectl get nodes
6)To use Kubernetes to deploy the WordPress application, we must first establish a deployment in Kubernetes that uses the WordPress image to launch the pods.
kubectl create deployment (name) --image=(image_name)
We must launch the WordPress application on the internet after generating the kubernetes deployment because the kubernetes environment is isolated by default. In order to access the application, we must expose the deployment on port 80. We’ll also need a load balancer for the deployment, which will balance all of the traffic coming in from the outside world.
Load Balancer: Because we’re utilising Google Kubernetes Engine, we’ll be using Google Cloud Platform’s load balancer by default. However, because we must give the load balancer to the kubernetes deployment, it is an external load balancer for kubernetes.
kubectl expose deployment (deployment_name) --type=LoadBalancer --port=80
In kubernetes the load balancer is known as Service .We can
In kubernetes the load balancer is known as Service .We can see all the services used by the deployment using command –>
see all the services used by the deployment using command –>
kubectl get services
We can also see through GUI one load balancer got created –>
To see everything is properly created or not in kubernetes use command –>
kubectl get all
7)Our WordPress application’s front end is now complete too
. We also used MySQL database to develop the back end methods to store the user data of the WordPress application. For us, the most important thing is to maintain the database, hence we utilise Google Cloud’s Database As A Service as MySQL.
As a result, we must use Google Cloud’s SQL service to launch these MySQL Database instances in a production environment, i.e. in VPC2.
–> Adding authorized network to public ip of MySQL Instance :
–> Log in to MySQL Instance to see available databases :
mysql -h (public_ip) -u (user_name) -p
–>Creating new database :
8) The last step is to link the WordPress programme to the database, which is a MySQL database. We may also connect to the WordPress application using the load balancer’s public IP.
To connect a MySQL database to a WordPress application, we also must first add the database user’s username and password.
After successfully connecting the database and login to WordPress we can also run the installation of the WordPress application .
Related Articles: Deployment of WordPress Web Application by Integrating Google Cloud Platform with Kubernetes
- Benefits of Using Angular for Web Development 2021
- KALI Linux Not Prefer Software Development Ubuntu
- How to Write Business Proposal for Client with Sample Format
- Top 10 Best Coolest Movies Chris Hemsworth of all time
- How to Increase Maximum upload file size WordPress 2 MB to TB or terabyte import unlimited – click here
- PHP 8.0 vs PHP 7.4 and PHP 8.0 features performance benchmark install setup – Click here
- WordPress Fill the form and PDF sent on Email using Contact Form 7 – Click here
- How to fix hidden plugin editor on WordPress 2020 | I can’t find my plugin editor- Click here
- GTmetrix VS Pingdom VS Google PageSpeed Insights VS Lighthouse Best performance optimization- Click here
- How to install wordpres on local machine like window 10 linux and Mac – Click here
- C vs C++ Difference Between C vs C++ vs Python vs Java
- Who is the strongest character in Naruto
- Top 10 Penny Stocks Invest 2021 Higher Return in 2025 2030
- What companies has Elon Musk owned
- Top 15 Future technology predictions for 2025 2030
- 20 Ways to Increase Traffic to Your Website Blogs
Deployment of WordPress Web Application by Integrating Google Cloud Platform with Kubernetes
Finally, I completed the Google Cloud Platform Workshop project Integrating Kubernetes with Google Cloud Platform using Google Kubernetes Engine to deploy WordPress web application in this manner.