Learn how to compose and deploy WordPress with KubeSphere step by step. From secrets to NodePort access, this guide helps you launch WordPress fast. Our 24/7 WordPress Live Support Team is always here to help you.
Running WordPress on Kubernetes sounds complex. However, with KubeSphere, it becomes practical, visual, and surprisingly clean. If you want a working setup you can access from outside the cluster, this guide shows exactly how to do it. Today, we’ll Compose and Deploy WordPress with KubeSphere using built-in tools that actually make sense.
Let’s get straight to it.

Overview
Why Use KubeSphere for WordPress?
First, KubeSphere removes the YAML fatigue. Instead of wrestling with raw manifests, you build applications visually while still keeping Kubernetes standards intact. More importantly, it’s perfect for teams, demos, and even production workloads where clarity matters.
So, if your goal is speed with control, Compose and Deploy WordPress with KubeSphere is the smart path.
Steps
Create Secrets (Database Safety First)
Before anything else, credentials must be secured.
First, Create a MySQL Secret
1. Log in to KubeSphere as project-regular
2. Then, open demo-project → Configuration → Secrets
3. Next, click Create
4. Enter the name mysql-secret
5. Select Default as the type
6. After that, add data:
- Key: MYSQL_ROOT_PASSWORD
- Value: 123456
7. Finally, click Create
Create a WordPress Secret
Follow the same steps again:
- Name: wordpress-secret
- Key: WORDPRESS_DB_PASSWORD
- Value: 123456
At this point, both secrets are ready.
Create a Persistent Volume Claim
Now that secrets are in place, WordPress needs persistent storage.
1. First, go to Storage → Persistent Volume Claims
2. Then, click Create
3. Enter the name wordpress-pvc
4. Next, choose any available Storage Class
5. Keep the default access mode and size
6. Finally, click Create
As a result, your WordPress data will survive pod restarts.
Launch WordPress Smarter with Experts

Create the Application (The Core Step)
Next, navigate to Application Workloads → Apps → Composed Apps and click Create.
First, Add MySQL (Backend)
- App Name: wordpress
- Service Type: Stateful Service
- Service Name: mysql
Image:
mysql:5.6
Memory limit: Minimum 1000 Mi
Environment Variable (From Secret):
MYSQL_ROOT_PASSWORD
Source: mysql-secret
Storage:
PVC Template Name: mysql
Mount Path:
/var/lib/mysql
After configuring these options, create the service.
Add WordPress (Frontend)
Service Type: Stateless Service
Name: wordpress
Image:
wordpress:4.8-apache
Environment Variables:
From Secret:
- WORDPRESS_DB_PASSWORD → wordpress-secret
Manual:
- WORDPRESS_DB_HOST=mysql
Important: This value must match the MySQL service name exactly.
Storage Mount:
- PVC: wordpress-pvc
- Mount Path:
/var/www/html
Finally, complete the app creation.
At this stage, you have successfully Compose and Deploy WordPress with KubeSphere using both backend and frontend services.
Verify Everything Is Running
Now, go to Workloads:
- Check mysql-v1 under StatefulSets
- Check wordpress-v1 under Deployments
If both show Running, WordPress is deployed correctly.
Finally, Access WordPress Using NodePort
To expose WordPress outside the cluster:
1. First, go to Application Workloads → Services
2. Then, click the three dots next to wordpress
3. Next, select Edit External Access
4. Choose NodePort and confirm
Now, access WordPress using:
http://{Node-IP}:{NodePort}
And just like that, your site is live.
Conclusion
To sum it up, Compose and Deploy WordPress with KubeSphere is not just beginner-friendly, it’s production-ready when done right. Because everything is visual, errors drop, speed improves, and results show faster. If Kubernetes felt intimidating before, this workflow changes that.
