Integrating AWS and GCP to host a website.

Integrating AWS and GCP to host a website.

Hey folks, I recently created a project in which I integrated the GoogleKubernetes Engine(GKE) service offered by GCP and Relational Database Services(RDS) offered by AWS to host a WordPress website.

Steps followed for the project:

  • Created a project in GCP called my-dev-project.
No alt text provided for this image
  • Created a new VPC called 'vpc-devproject' in this project:
No alt text provided for this image
  • Created a new firewall rule called 'myvpcfirewall' for allowing inbound traffic from outside world:
No alt text provided for this image
  • Configured a Kubernetes Cluster in GKE service of GCP having following specifications:
  1. Name: samarth-k8s-cluster
  2. Region: asia-southeast-1
  3. Default Node Locations: asia-southeast-1-a, asia-southeast-1-b, asia-southeast-1-c.
  4. Nodes per-zone: 1
  5. Total Nodes:3
No alt text provided for this image
No alt text provided for this image
  • Installed and configured GoogleCloud SDK for using GCP via local CMD. Then connected to the k8s cluster running on GCP via local CMD using the provided command.
No alt text provided for this image
No alt text provided for this image
  • Created a deployment named 'mywp' using the WordPress image from DockerHub.
No alt text provided for this image
  • By default the pods are not accessible by the outside world, we have to expose the pod. Used the Load Balancer service of GCP to expose the port 80 of WordPress pods so that we can use them by typing the IP in the browser.
No alt text provided for this image
  • After the above command, a Load Balancer automatically gets created in the GCP as k8s uses the LB.
No alt text provided for this image
  • Using the external IP of the Load Balancer to connect to our WordPress pods.
No alt text provided for this image
  • For the backend Database, the RDS service of AWS is used:
No alt text provided for this image
No alt text provided for this image
  • Entered the database details for setting the WordPress website.
No alt text provided for this image
  • Now, WordPress is set up successfully and we enter our details and create login credentials.
No alt text provided for this image
  • If the setup is done successfully, we can log in to our dashboard and post an article.
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

THANK YOU FOR READING..

Pratik Kohad ????

SIH Grand Finalist 2020 || MLops || ARTH Ambassador and Learner at LinuxWorld Informatics Pvt. Ltd

4 年

Great work bro

要查看或添加评论,请登录

Samarth Pant的更多文章

社区洞察

其他会员也浏览了