Deploy the WordPress Application on Kubernetes and MySQL (RDS) Database on AWS Cloud using Terraform

Skabhi
4 min readAug 31, 2020

--

Task Description :-

  • Write an Infrastructure as code using terraform, which automatically deploy the Wordpress application.
  • On AWS, use RDS service for the relational database for Wordpress application.
  • Deploy the Wordpress as a container either on top of Minikube or EKS or Fargate service on AWS.
  • The Wordpress application should be accessible from the public world if deployed on AWS or through workstation if deployed on Minikube.

What is Kubernetes?

Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services. On K8S (short for Kubernetes) we create containers and launch our application on top of these containers. Containers provide isolation and everything is managed by K8S.

What are Containers?

A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.

What is the need of Kubernetes?

Containers are a good way to bundle and run your applications. In a production environment, you need to manage the containers that run the applications and ensure that there is no downtime. For example, if a container goes down, another container needs to start. This is where Kubernetes helps us. Everything is managed by Kubernetes itself. We just need to specify the templates of the container and Kubernetes will do its job.

What is AWS-RDS?

Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and re-sizable capacity while automating time-consuming administration tasks such as hardware provisioning, database setup, patching and backups.

Let’s Get Started

Step 1. Get your AWS login credentials and passwords.

Step 2 . Write an Infrastructure as code using Terraform, which automatically deploy the WordPress application on kubernetes.

  • Applying our terraform code using :

terraform apply — auto-approve

  • Successfully deployed WordPress as a container on top of Minikube.

Step 3. On AWS, use RDS service for the relational database for WordPress application and write all the code on terraform.

  • Applying our terraform code using :

terraform apply — auto-approve

Step 4. After the infrastructure is created now we need to visit the WordPress website.Next we have to fill all the information of the database and after clicking the next button everything will be installed and configured.

Thanks, hope you guys will like my article. if you have any suggestion or query will free to ask.

#Happylearning #keepsharing #aws#Terraform

--

--

No responses yet