DEPLOYING WORDPRESS USIND AWS RDS AND KUBERNATES

DEPLOYING WORDPRESS USIND AWS RDS AND KUBERNATES

Hey guys hope you all are doing good today article gonna be super fun and you can use it for your use as the heading suggests today we are going to deploy WordPress website on Kubernetes and a database will be AWS RDS sounds interesting right ??

Let's start with the process of deployment here I am assuming you have set k8s in your system I am using Kubernetes on minikube you can use aws eks also as discussed in the previous article if not seen click here.

First, let's start with deploying WordPress on Kubernetes using terraform here I am using a minikube cluster.

Step1 start minikube cluster

No alt text provided for this image
No alt text provided for this image


After this is done I have written terraform code fr running local cmnd in our prompt using null resource u can grab code from git hub repo that I attach in the last fetch code from that and move in the directory and after this first cmnd, u have to run terraform init(to install all the required resource) after this you have to run terraform plan to see what's going to deploy and at last terraform apply which will deploy all the things.

No alt text provided for this image
No alt text provided for this image

Once this is done two more commands we have to run one to get minkube IP(to get minkube IP) and kubectl get svc to get ports where our service is deployed.

No alt text provided for this image

Once you get this just go the IP and u see the below type of screen

No alt text provided for this image
No alt text provided for this image

Once complete till here its time to set a database because we need database name, username, password, and host etc.

Let's start process os setting rds in aws here I have used terraform for deploying rds terraform code I will be putting in my GitHub repo that you can find at the end of the article. Clone the git repo and open the folder and go to cmnd prompt run all three cmnd we discuss above while setting WordPress on Kubernetes.

No alt text provided for this image
No alt text provided for this image

This gonna be taking time for deploying rds on aws in terraform code one thing you have to remember this line which I highlighted in below pic

No alt text provided for this image

They contain DB username, name, port, and password so set accordingly. Once deployment is done go to aws console.

No alt text provided for this image
No alt text provided for this image

In the above image you can see info creating means it is creating once it is done you can see the domain name in the endpoint that is what your host.

Once this is created now we create one ec2 instance from which we can see database and table in DB.

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
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
No alt text provided for this image

Please see the above image carefully in that I have used some command of MySQL to connect remotely from instance.

Once you create databases inside DB then move to WordPress site and fill the required information.

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
No alt text provided for this image

Once all this is done we all are ready to go

No alt text provided for this image

Here above you can see our site is deployed successfully.

now if you want to destroy use terraform destroy

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

Here we come to the end of the article I hope you like the article thanks for reading till here. Below I am attaching Git repo all terraform code will be inside the repo.




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

Aditya Gupta的更多文章

  • My Views on Industry Use Cases of Kubernetes/ Devops Session

    My Views on Industry Use Cases of Kubernetes/ Devops Session

    Hey guys hope you all are doing today's article is going to thong I learn from yesterday's session. Yesterday in Linux…

  • My Views on Industry Use Cases of Kubernetes/ OpenShift Session

    My Views on Industry Use Cases of Kubernetes/ OpenShift Session

    hey guys hope you all are doing good this article is related to a session attended by me at Linux world the session was…

  • A Session To Remember On Ansible

    A Session To Remember On Ansible

    Hey guys Hope you all are doing this article is about the wonderful session I had on Monday 28DEC2020. As being…

  • DEPLOYING WORDPRESS WEBSITE ON GCP CLOUD USING SQL AND GKE

    DEPLOYING WORDPRESS WEBSITE ON GCP CLOUD USING SQL AND GKE

    Hey guys hope you are doing good today we are going to deploy WordPress website on GKE using SQL service and also gone…

  • GCP WORKSHOP FEEDBACK

    GCP WORKSHOP FEEDBACK

    Hey guys yesterday I have completed in days GCP workshop under the guidance of Mr. Vimal Daga sir at LinuxWorld in this…

  • SEMANTIC SEARCH ENGINE FOR Q&A USING ELASTIC SEARCH AND DOCKER

    SEMANTIC SEARCH ENGINE FOR Q&A USING ELASTIC SEARCH AND DOCKER

    Hey guys in today's article is about my DevOps project which I created with my partner. PROBLEM DEFINITION When we are…

    2 条评论
  • Python Bot

    Python Bot

    Hey guys hope you all are doing good. In today's article, we are going to see how to make our own chatbot in python to…

  • Flutter Music player/Video Player

    Flutter Music player/Video Player

    Hey guys hope you all are doing good today we are going to learn very different things which we learn usually today we…

  • Network For Web Portal Using Terraform And Aws

    Network For Web Portal Using Terraform And Aws

    Hey guys hope you all are doing good in today's article we are going to see how to create our VPC, Subnet, Internet…

  • DevOps ASSEMBLY LINE SUMMER INTERNSHIP

    DevOps ASSEMBLY LINE SUMMER INTERNSHIP

    Hey guys Today this article is not about any tech stuff but for it becomes more important some time than learning only…

社区洞察

其他会员也浏览了