Codementor Events

Highly Available WordPress on Kubernetes (video included)

Published Oct 24, 2018Last updated Nov 01, 2018
Highly Available WordPress on Kubernetes (video included)

Wordpress @ 160 requests per second

We’ll take a brand new Kubernetes Cluster and deploy WordPress making it highly available by using Replicas, MySQL & an NFS Service. This exercise will cover the following Kubernetes Topics:

  • Kubernetes Deployments
  • Kubernetes Services
  • Kubernetes Ingress
  • Kubernetes PersistentVolume
  • Kubernetes PersistentVolumeClaim

By combining these resources with MySQL and an NFS Service you’ll be able to see, in real time, a simple WordPress Service handling over 120 requests per second!

The Kubernetes Architecture

Screen Shot 2018-10-21 at 2.17.12 PM

Traffic will be routed to our (multiple) WordPress Pods through the Ingress Controller (which is basically a reverse proxy). Through Services our pods will receive the end users http requests which will be served by the running containers web server.

WordPress will read (and write) persistent data to disk which will be represented by an NFS mount locally within each container. By using an NFS mount our pods can scale horizontally and be backed by the same filesystem removing the requirement to replicate data manually and having a cloud provider that supports volumes with “ReadWriteMany” mounting procedures.

Deploy Highly Available Wordpress on Kubernetes

Source Code Repositories covered in this demonstration:

Alternatively you can use this monorepo: https://github.com/mateothegreat/k8-byexamples-highly-available-wordpress.

See more at https://matthewdavis.io

Discover and read more posts from Matthew Davis
get started
post commentsBe the first to share your opinion
Show more replies