Deploying WordPress site using Kubernetes and integrating it with a database by using Amazon RDS Service

# What is Amazon RDS Service?

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 resizable capacity while automating time-consuming administration tasks such as hardware provisioning, database setup, patching and backups. It frees you to focus on your applications so you can give them the fast performance, high availability, security and compatibility they need.

For more info visit: https://aws.amazon.com/rds/

# Task Description:

Deploy the WordPress application on Kubernetes and AWS using terraform including the following steps:

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.

So now let’s move towards Practical part:

# Launch ‘Minikube’ and mentioned the kubernetes provider in the terraform code.

# Use Kubernetes deployment resource to deploy the pod for WordPress and properly configure the things required.

# Use Kubernetes Service resource and add a node-port so that we can access the WordPress,so that it can be accessed by everyone:

# to create a database for our WordPress site, we will use terraform for using AWS RDS service so we use AWS provider:

# Now after we write both the files,now we initialize the terraform by using the command:

# use terraform apply command to run the terraform code:

# Now we'll manually check the kubernetes service and pods etc.

Here you can see from above image that our WordPress is successfully deployed in kubernetes with 2 replicas.

→Here you can see our terraform code is deploying all the things successfully !!.

“ !! Now let’s check on AWS RDS service whether our databases is created or not !! “

Here you can see our databases is created successfully.

Now let’s check whether we connect to our WordPress site or not using minikube IP in my cases IP is .

# Now use the correct credentials you have provided in your db.tf file.

To get the Database host details, we can get it at end of the terraform code completion.

So, if we have put all the details correctly, so finally it gets connected to the AWS RDS database, and we can further launch our website on WordPress.

Finally,our task is done.

To see the code I have written for this task follow my repository link for the task.

GitHub Link: https://github.com/mayank-aly/cloud-task-6.git

Feel free to contact me anytime on my LinkedIn profile: https://www.linkedin.com/in/mayank-varshney-62744a163




I am a forward-thinking individual with exceptional skills in problem-solving, adaptive thinking, automation, and development.

Love podcasts or audiobooks? Learn on the go with our new app.

Stress Testing is a Must

What they publish: This women’s site is primarily, but

How to perform Named Entity Recognition NER in C# .NET Framework with NLP

White Elephant Finance

5 Myths Revolving Around Low-code SharePoint Application Development

Easiest Way to Visualize Loop Progress in Python

Maze Runner

Flutter Context and “.of” method

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


I am a forward-thinking individual with exceptional skills in problem-solving, adaptive thinking, automation, and development.

More from Medium

[Short Note] Connect IAM user to EKS cluster

Toto, I’ve a feeling we’re not in Kansas anymore

How are you protecting your backups?

A stone castle on a hilltop

Brief about YAML

Brief about YAML