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 provided the Services and Deployments files necessary to start this lab. You can find them in the ./resources directory. You will be using them, and also creating additional files to help deploy a more rugged version of WordPress this afternoon.

The database backing WordPress is MySQL in this instance. On Day 1 of the course, 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. 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