Kubernetes custom wordpress deployment with php-fpm & nginx ingress
These instructions will get you a copy of the project up and running on your cloud machine for development and testing purposes.
Kubernetes cluster with nginx ingress installed
Kubernetes <= 0.10
A step by step series of examples that tell you how to get a setup wordpress env running
Build custom WordPress docker image using official php-fpm WordPress docker version
Official WordPress docker : https://hub.docker.com/_/wordpress
Exmple docker file
FROM wordpress:5-php7.2
COPY ./ /usr/src/wordpress/
EXPOSE 80
EXPOSE 9000
Edit & apply wordpress-configmap.yaml
kubectl apply -f wordpress-configmap.yaml
Edit & apply fast-cgi-configmap.yaml & ingress.yaml (uncomment annotations)
kubectl apply -f fast-cgi-configmap.yaml
kubectl apply -f ingress.yaml
kubectl apply -f nginx-configmap.yaml
If want to use SSL/TLS cetificate setup cert-manager and apply clusterissuer
Edit & apply cluster-issuer.yaml
kubectl apply -f cluster-issuer.yaml
WordPress deployment will create One with Two container inside it (Nginx + Wordpress php-fpm)
Edit & apply wordpress-deployment.yaml & wordpress-service.yaml
kubectl apply -f wordpress-service.yaml
kubectl apply -f wordpress-deployment.yaml
nginx ingress > nginx container inside POD > wordpress container (over localhost in same POD)