Launching a WordPress and MySQL architecture on K8s cluster on AWS cloud via Ansible
2 min readSep 6, 2022
What is Kubernetes ?
Kubernetes is an open-source container orchestration engine for automating the deployment, scaling, and management of containerized applications. The open-source project is hosted by the Cloud Native Computing Foundation.
- So, first I have created a Multi-node Kubernetes cluster on AWS Cloud via Ansible roles
- After completing the above setup, we could confirm the setup by running kubectl get nodes to command in the master node of the cluster.
- Now we would create a role to set up the Multitier setup on the Kubernetes setup.
- We will use the mysql1:5.7 image for Database setup. And wordpress:5.1.1-php7.3-apache for frontend setup.
- Now we would run our role to set up the cluster. And print the IPs of the POD and the port of the service exposed to the public.
- We will now access the WordPress site and provide the endpoint for the Database connection.
We can see that our WordPress has launched. - Now, we would provide an endpoint connected to the database to store the site-collected data. We would provide the Username, database name, password, and database host.
- Now we would create a login account to WordPress and provide a site title.