Day 60 – Kubernetes Capstone Project: WordPress + MySQL
On Day 60 of my 90 Days of DevOps journey, I completed my Kubernetes capstone project by deploying a full WordPress + MySQL application using multiple Kubernetes concepts together.
For the past several days, I learned different Kubernetes components separately:
Pods Deployments Services ConfigMaps Secrets PVCs StatefulSets Resource Limits Probes HPA Helm
Today I finally combined all those concepts into one real application deployment.
This was one of the biggest learning milestones in my Kubernetes journey so far.
Creating the Capstone Namespace
First, I created a dedicated namespace called:
capstone
This helped isolate all resources related to the project.
I also changed the default namespace context so I didn’t need to type:
-n capstone
again and again.
Deploying MySQL using StatefulSet
For MySQL, I used a StatefulSet because databases require:
stable storage stable identity persistent data
I created:
Secret for database credentials Headless Service for stable DNS StatefulSet for MySQL
I also configured:
resource requests and limits persistent storage using PVCs
The StatefulSet automatically created stable Pod names like:
mysql-0
and attached persistent storage to it.
After deployment, I connected to MySQL using:
kubectl exec
and verified that the:
wordpress
database existed successfully.
Deploying WordPress
Next, I deployed WordPress using a Deployment with:
2 replicas
I created a ConfigMap containing:
WORDPRESS_DB_HOST WORDPRESS_DB_NAME
and used Secret references for:
database username database password
I also added:
liveness probes readiness probes resource requests and limits
Initially the probes failed for some time while WordPress was starting, but after waiting a little both Pods became:
1/1 Running
successfully.
Exposing WordPress
Then I exposed WordPress using a:
NodePort Service
and accessed the application in the browser.
For the first time, I saw the WordPress setup page running from my Kubernetes cluster
I completed the WordPress setup wizard and created a sample blog post successfully.
That moment honestly felt very rewarding.
Testing Self-Healing
Next, I tested Kubernetes self-healing behavior.
First, I deleted one WordPress Pod.
Within seconds, Kubernetes automatically recreated it using the Deployment controller.
Then I deleted:
mysql-0
and watched the StatefulSet recreate it automatically.
The best part:
After both Pods recovered, my WordPress blog post still existed.
That proved:
persistent storage was working correctly.
This was one of the coolest Kubernetes demonstrations so far.
Setting Up HPA
I also created a Horizontal Pod Autoscaler for WordPress.
The HPA was configured with:
minimum replicas: 2 maximum replicas: 10 CPU target: 50%
Then I checked:
kubectl get hpa
and verified that Kubernetes was monitoring the Deployment correctly.
Comparing with Helm
Finally, I also tested deploying WordPress using Helm.
Compared to writing multiple YAML files manually, Helm created the complete application stack using a single command.
This helped me understand:
manual configuration gives more control
while:
Helm provides faster deployment and easier management.
What I Learned Today
Today I used:
Namespaces Secrets ConfigMaps PVCs StatefulSets Headless Services Deployments NodePort Services Resource Limits Liveness & Readiness Probes HPA Helm
all together in one Kubernetes project.
Final Thoughts
This capstone project helped me connect all the Kubernetes concepts I learned over the last several days.
Deploying a real WordPress + MySQL application made Kubernetes feel much more practical and realistic.
Watching self-healing, persistence, scaling, and networking work together inside the cluster was an amazing learning experience
60 days completed successfully
