Activity 7: Running a Persistent Database on Kubernetes
Imagine that you work on a microservice that is responsible for the payments on an e-commerce website. You are required to deploy a database management system. The data kept in this database needs to stay secure for a long time, especially for legal and audit purposes. Data loss could mean catastrophe for the company. Your task is to deploy a MySQL relational database management system (because of the high number of transactions in this microservice) with a volume that won't be cleaned up if the pod crashes or is removed.
NoteÂ
To complete this activity, you can use Minikube or a managed Kubernetes cluster such as GKE.
Execute the following steps to complete this activity:
- Create a
Deployment
definition file for MySQL, which uses a secret for the user password and a Volume using a PVC. - Create a service definition file for your deployment.
- Generate a password and deploy a secret using the password...