Deploy the WordPress application on Kubernetes and RDS for Storage | AWS | Terraform

Samkit Shah
3 min readAug 31, 2020

Down below is the overview of this article :

1. We will write an Infrastructure as code using Terraform, which automatically deploy the WordPress application

2. On AWS, using RDS service for the relational database for the WordPress application.

3. We will deploy WordPress as a container either on top of Minikube or EKS or Fargate service on AWS

4. Then the WordPress application should be accessible from the public world if deployed on AWS or through workstation if deployed on Minikube.

Pre-requisite:

Let’s start

First, We will write a terraform code for launching Kubernetes. Also, we write about the provider we will use eg: AWS, GCP, etc.

Looking at the above code you can see that we are using AWS resources and Kubernetes for the deployment of WordPress container.

In the above terraform code we are using k8s services i.e NodePort. This service will expose the service to the particular port mentioned as WordPress works in port 80, we have mentioned 80 port.

Now we are going to create a database server for our WordPress Application using RDS in AWS.

After writing the terraform code. We have to run the command:

terraform init terraform apply

If you get everything green then you are on the right track and everything works fine. Also, we have deployed WordPress as a container on the top of Minikube.

Now to get the IP for WordPress. In the command line type:

minikube ip 

Also, you can see services are running

Now using your IP : 192.168.99.103:30423 you can access WordPress Application.

Thanks for reading!

Let’s connect: Linkedln

--

--

Samkit Shah
Samkit Shah

Written by Samkit Shah

Machine Learning | Deep Learning | DevOps | MLOps | Cloud Computing | BigData

No responses yet