PerconaDB and Wordpress in Kubernetes

This is a method to deploy a Percona DB cluster with WordPress using both docker-compose and Kubernetes on Google Cloud.

PerconaDB and Wordpress in Kubernetes

PerconaDB and Wordpress in Kubernetes

The training material is presented as a PDF on GitHub and contains Docker vs VM comparisons, useful Docker commands a nice overview of the container world.

As a practice material, we also provided you with a method to deploy a Percona DB cluster with WordPress using both docker-compose and Kubernetes to get you started.

All the info about running the stack or accessing the admin account after stack creation are available on our repo, but we’ll also publish them here for reference:

Kubernetes

#### Connect to cluster ``` cd kubernetes kubectl create namespace kubectl config set-context $(kubectl config current-context) –namespace= ``` #### Set persistence ``` kubectl create -f set-persistence.yaml ``` #### Create database ``` kubectl create -f replica-set-db-primary.yaml kubectl expose rs db-primary ``` #### Expand database into cluster ``` kubectl create -f replica-set-db-slave.yaml kubectl create -f service-db-cluster.yaml kubectl get pods,services ``` #### Create web servers ``` kubectl create -f deployment-wordpress.yaml kubectl expose deployment web –type=LoadBalancer ```

Final notes

Need help implementing this?

Feel free to contact us using this form or via email at .

Share this on LinkedIn

More Articles

Our Certifications

AWS DevOps Engineer AWS Solutions Architect AWS SysOps Administrator Google Certified Administrator Microsoft Certified Professional