?? Hybrid Multi Cloud Task-3??

?? Hybrid Multi Cloud Task-3??

INTEGRATION OF WORDPRESS RUNNING ON TOP OF KUBERNETES CLUSTER WITH AWS RDS.??

So, you might be thinking that what is AWS RDS and KUBERNETES ? ??

AWS RDS is a Relational Database Service by AWS. This service aims to simplify the setup and scaling of the database. Within a few minutes, we can create our full-fledged working database.

Kubernetes is an open-source platform that is used for managing Containerized services. In, short Kubernetes is Container-Orchestration tool.

No alt text provided for this image

In this article, we will be setting up a WordPress on the top of the K8S cluster and then we will we creating MariaDB DataBase on the top of AWS RDS and finally, we will be integrating the same. Also, we will be doing this with the help of terraform.

So, let’s start and first understand what we will be doing throughout this article step by step.

?? We will be writing an Infrastructure as code using Terraform, which automatically deploy the WordPress application

?? On AWS, we will use the RDS service for the relational database for the WordPress application.

?? We will deploy WordPress as a container on top of the Minikube cluster.

?? Also, The WordPress application will be accessible from the public world if deployed on AWS or through workstation if deployed on Minikube.

For this, there are some pre-requisite to be done before beginning this project.

  1. MINIKUBE SHOULD BE INSTALLED.
  2. SHOULD HAVE AWS ACCOUNT PRE CREATED.
  3. TERRAFORM SHOULD BE ALSO INSTALLED.

Now, let’s create this project step by step.

Step 1: In the first step, we will be launching WORDPRESS on the top of the MINIKUBE cluster by using TERRAFORM.

For this, we will be creating a file with extension .tf

Now, let’s write our code that will deploy WordPress.

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

In this file we will define the provider which is KUBERNETES in this case, Create deployment, define no of replicas so that our infrastructure never gets down, we will also specify an image that is WORDPRESS.

Step 2: Now, its time to launch a DATABASE in AWS using AWS RDS.

For this, we will be creating another file with .tf extension.

No alt text provided for this image

Here, we will define the provider name that is AWS in this case. Also, I am using the default profile and ap-south region that is the MUMBAI region. Storage type, engine type, version for database, etc will also be defined in this file.

Also, we will be defining USERNAME, PASSWORD, and DATABASE NAME.

FOR INITIALIZING COMMAND IS

terraform init

This command will download all the plugins required by our project.

No alt text provided for this image

Now, its time to run our code. To, the run command is

terraform apply --auto-approve

This command will deploy the whole resources within few minutes.

No alt text provided for this image

Lets check if everything is right or not.

No alt text provided for this image

YES!! DATABASE IS LAUNCHED IN AWS RDS.

ALSO, OUR KUBERNETES DEPLOYMENT IS READY.

kubectl get all

No alt text provided for this image

Now, just type

minikube service list

This command will give a list of all the services in K8S.

No alt text provided for this image

Just copy the URL and run this in any browser.

No alt text provided for this image

Finally, everything is right.

We had landed in FAMOUS FIVE MINUTES INSTALLATION.

After, selecting language another screen will popup in which we have to fill DATABASE NAME, USERNAME, PASSWORD, DATABASE HOST.

No alt text provided for this image

Here Database Host is the endpoint of RDS. For EndPoint, we will have to move into the AWS Console. This can also be viewed on the terminal only by using the output module of terraform.

No alt text provided for this image

Just copy the ENDPOINT and paste the same in the DATABASE HOST field.

GOOD TO GO!!

No alt text provided for this image

It’s CONNECTED!! JUST CHECK CURRENT ACTIVITY

Thanks for reading..................

HOPE THIS ARTICLE WILL BE HELPFUL!!


Shreeraj Redgaonkar

Upcoming Technology Analyst @Morgan-Stanley | MSIC'23 Winner | 4x Red Hat Certified Professional | VJTI IT'25

4 年

Nice article brother ????

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

Tushar Dighe的更多文章

  • Enhancing Cloud Security with Wiz: A Game-Changer for DevOps and Security Teams

    Enhancing Cloud Security with Wiz: A Game-Changer for DevOps and Security Teams

    Enhancing Cloud Security with Wiz: A Game-Changer for DevOps and Security Teams In today's fast-paced cloud…

  • AWS : NASA Case Study

    AWS : NASA Case Study

    Established in 1958, the National Aeronautics and Space Administration (NASA) has been working around the world—and off…

  • The World of “Big Data”

    The World of “Big Data”

    What is data? The quantities, characters, or symbols on which operations are performed by a computer, which may be…

  • ?? Hybrid Multi Cloud Task-2??

    ?? Hybrid Multi Cloud Task-2??

    Using EFS service with Terraform. Objective: Perform the task-1 using EFS instead of EBS service on the AWS as…

  • ?? Hybrid Multi Cloud Task-1??

    ?? Hybrid Multi Cloud Task-1??

    To launch Webserver with AWS using Terraform code Steps required to launch the App using terraform:- 1. Create the key…

  • ?? Ansible Task-2??

    ?? Ansible Task-2??

    Deploying Web Server on AWS through ANSIBLE! TASK DESCRIPTION: ?? Provision EC2 instance through ansible. ?? Retrieve…

  • ?? DevOps Task-6 ??

    ?? DevOps Task-6 ??

    Integration of Jenkins with Kubernetes using groovy What is Groovy? Groovy is a Java-syntax-compatible object-oriented…

  • ?? DevOps Task-5 ??

    ?? DevOps Task-5 ??

    Deploy prometheus and grafana on the top of kubernetes . Tasks : Integrate Prometheus and Grafana and perform in…

  • ?? DevOps Task-4 ??

    ?? DevOps Task-4 ??

    In this article i have created a fully automated CI/CD build pipeline by using the technology git, github, Jenkins…

  • ?? Ansible Task-1 ??

    ?? Ansible Task-1 ??

    Integrate Ansible with Docker What is Ansible ?? Ansible is an open-source automation tool, or platform, used for IT…

    2 条评论

社区洞察

其他会员也浏览了