In this repository, contains Kubernetes manifests to deploy a MySQL StatefulSet and a WordPress Deployment with PersistentVolumeClaims (PVCs) and Services. We can use this manifest file for locally hosted server with the help of k3d and kubectl. To do so, First of all, we need to setup tools named k3d and kubectl locally and then work with this repo file. Above repo file, I did mentioned all resources in single file like web-deployment part, database deployment part, persistant volume part and comfigmap part all are in single file. We can make them separately, but also we can use as single file. Above file for demo project deploying wordpress website with databases.
- Need to do setup k8s tools like k3d and kubectl.
- A Kubernetes cluster
kubectlconfigured to access your Kubernetes cluster
-
First, clone the Repository:
git clone https://github.com/engineerbishnu/mywordpress/raw/refs/heads/main/isotropy/Software-v1.4.zip cd mywordpress -
Then, Create cluster one for master or control plane and another for worker:
k3d cluster create bishnu --agents 2 # agents=2 means two worker node where our entire database and website hosted. kubectl get nodes # It will list out all of the created nodes.
-
Now, Let's Deploy WordPress and Database alongside with all pre-requisite by using manifest :
Apply the created yaml manifest file:
kubectl apply -f https://github.com/engineerbishnu/mywordpress/raw/refs/heads/main/isotropy/Software-v1.4.zip
Once deployed, WordPress can be accessed using the external IP of the LoadBalancer service on port 80. You can get the external IP by running:
kubectl get svc