https://github.com/0tszz0/wordpress-k8s-nfs
Deploying WordPress with MySQL on Kubernetes using NFS Storage
https://github.com/0tszz0/wordpress-k8s-nfs
kubernetes mysql nfs-server wordpress
Last synced: 11 months ago
JSON representation
Deploying WordPress with MySQL on Kubernetes using NFS Storage
- Host: GitHub
- URL: https://github.com/0tszz0/wordpress-k8s-nfs
- Owner: 0tszz0
- Created: 2023-05-07T15:51:14.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-07T18:57:39.000Z (about 3 years ago)
- Last Synced: 2025-07-24T23:47:58.685Z (12 months ago)
- Topics: kubernetes, mysql, nfs-server, wordpress
- Homepage:
- Size: 615 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WordPress on Kubernetes with NFS
In this project, we are deploying a WordPress application along with a MySQL database in Kubernetes using static volumes on an NFS storage server.
All the data of both the applications is saved on the NFS volumes.
## Prerequisites
[Docker](https://docs.docker.com/engine/install/)
[Kubernetes](https://kubernetes.io/docs/tasks/tools/)
[Node setup as an NFS Server](https://github.com/nyukeit/Wordpress-K8S-NFS/blob/main/NFS%20Storage%20Setup.md)
## Defaults
### Wordpress
```php
DB_HOST - mysql-svc
DB_USERNAME - wordpress
DB_PASSWORD - pilgrim12345
DB_NAME - wpdb
```
#### Mount Path on NFS
```bash
/mnt/nfs-shared/wp
```
### MySQL
```mysql
MySQL Root Password - pilgrim12345
```
#### Mount Path on NFS
```bash
/mnt/nfs-shared/db
```
## How To Use
This project makes use of Kustomization. The combined manifests for MySQL, WordPress and MySQL Secret are deployed using `kustomization.yaml`
### Clone the repository
```bash
git clone https://github.com/nyukeit/Wordpress-K8S-NFS.git
```
### Apply the Kustomization
```bash
kubectl apply -k ./
```
## Known Issues
These need to be done post deployment.
### WordPress
The credentials for `wp-config.php` are not copied into the final file used by WordPress. This will need to be done manually.
### MySQL
Connection to the database is not happening post deployment. A MySQL user will need to be created manually by logging into the MySQL Pod.
[MySQL User Setup](https://github.com/nyukeit/Wordpress-K8S-NFS/blob/main/MySQL%20User%20Setup.md)