// diagrams › kubernetes
WordPress and MySQL on Kubernetes with persistent volumes
The official WordPress and MySQL tutorial on Kubernetes, drawn object by object: Deployments, Services, PersistentVolumeClaims and a Secret, then what to change before real visitors arrive.
Opens a copy in the editor, in a new tab, ready to change. No account needed.
What’s in this diagram
services and parts
- Visitors
- mysql-pass Secret (kustomize secretGenerator)
- wordpress-mysql Deployment (Recreate)
- wordpress Service (LoadBalancer, port 80)
- wordpress Deployment (Recreate)
- WordPress pod (wordpress:6.2.1-apache)
- wordpress-mysql Service (headless, 3306)
- MySQL pod (mysql:8.0)
- wp-pv-claim (20Gi, ReadWriteOnce)
- Default StorageClass
- mysql-pv-claim (20Gi, ReadWriteOnce)
groups
- Kubernetes cluster
- Namespace
Key points
- Two Deployments, two Services, two PersistentVolumeClaims and one Secret make the whole application.
- WordPress finds MySQL by the Service's name, not by a pod address.
- Each volume is ReadWriteOnce, so each Deployment can run only one pod: this design cannot scale out as drawn.
- For production, the tutorial itself points to a packaged Helm chart; we also suggest a managed database.
The whole story, step by step: WordPress on Kubernetes: from tutorial to production.


