Difficulty: intermediate
Estimated Time: 15-45 minutes

BoxBoat Logo

Welcome to the final section of Kubernetes Fundamentals II. In this lab, we will configure and deploy WordPress on Kubernetes. We previously did this as a challenge lab at the end of the first day. We'll start off where we left off, but now configure our applications using more advanced Kubernetes objects.

To find out more, visit here.

Kubernetes Fundamentals II - Advanced WordPress Lab

Step 1 of 6

MySQL Secrets

We've talked a lot about WordPress, now its time to deploy it. We've included the base files to deploy WordPress in ./resources. Your job is to modify these files to use ConfigMaps, Secrets, and Persistent Volumes and Claims.

The database backing WordPress is MySQL in this instance. In the included Deployment manifest, we specified a password for the database directly via an environment variable. However, that couples the configuration to the actual Deployment, which is something we'd like to avoid.

Kubernetes Secrets allow us to decouple this information from the actual application.

Your job is to create a password and store it as a Kubernetes Secret for the MySQL Deployment to consume, and then update the Deployment to actually use it. You can accomplish this by creating a secret on the command line.

Once you've created your Secret, verify that it exists:

kubectl get secrets

The output of the command should look something like:

NAME         TYPE     DATA   AGE
mysql-pass   Opaque   1      42s