Skip to content
Kubernetes deployment with NGINX Ingress, Wordpress 9.5, MariaDB and persistent volumes
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore First commit Jul 21, 2018
namespace.yaml First commit Jul 21, 2018
nginx-ingress.yaml First commit Jul 21, 2018
secrets.yaml First commit Jul 21, 2018

Kubernetes NGINX-Ingress + Wordpress9.5 + MariaDB + Persistent Volumes


This is a template project for deploy on Kubernetes (Minikube) a Wordpress 9.5 application with well-optimized nginx ingress controller, config Maps, secrets and more.


  • Minikube installed locally
  • Kubectl v1.11.1



Generate certs manually:

$ mkdir certs
$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./certs/tls-key.key -out -/certs/tls-cert.crt  

Create k8s secret for certs:

$ kubectl create secret tls tls-certificate --key ./certs/tls-key.key --cert ./certs/tls-cert.crt
$ kubectl label secret tls-certificate app=wpdemo

Create Resources (Services, Ingress, Deployments ...):

$ kubectl apply -f secrets.yaml
$ kubectl apply -f db-tier-deployment.yaml
$ kubectl apply -f app-tier-deployment.yaml
$ kubectl apply -f nginx-ingress.yaml

Create local host for domain (or edit it)

  • Adds to /etc/hosts file with Minikube cluster ip
  • Example:

To get cluster IP:

$ minikube ip //Get Kubernetes Cluster IP

Test it!

$ minikube dashboard //Check cluster resources


Demo Wordpress Credentials:

  • username: admin
  • password: Demo12345!

Delete all resources

$ kubectl delete svc,pv,pvc,deployments,pods,secrets,ingress -l app=wpdemo


  • Optimize NGINX Ingress configuration
  • Generate installation sh script
  • Configuration documentation
You can’t perform that action at this time.