A Production Database#

In this milestone you will make your database production ready. This is an essential step in developing an application as your database holds your most valuable and irreplaceable data.

Requirements#

To complete this milestone you have a choice of how to implement a production database. They are all acceptable to me, though some are harder than others. Pick an option below and meet the corresponding requirements.

Option 1: Non-Scalable Single Container Postgres#

Note

I messed up! If you completed the Deploy to Kubernetes milestone you have already done this task.

This is the easiest way to go, but will leave the door open to making a scalable instance using a StatefulSet in a future milestone. To accomplish this option create a PersistentVolumeClaim to hold the database and make Postgres use it.

  1. A Pod definition for Postgres with that makes use of a PersistentVolumeClaim to keep data safe.

Option 2: A Scalable Postgres Deployed with helm#

Helm charts are awesome! Deploy a fully scalable Postgres instance using the Bitnami Helm chart. To save cost make sure you keep the instance scaled to a minimum right now (1 write and 0 read copies).

  1. Use the Bitnami Helm chart to deploy Postgres and connect it to your Django application.

Option 3: Managed Services#

No one ever got fired for using managed services (but they may have gone broke). Google’s managed SQL is the most hassle free and reliable option and the most expensive! Be careful to create a minimal instance and to understand the pricing before you use it.

  1. Create a Cloud SQL instance outside of Kubernetes and connect it to your Django application.

Turn in#

  1. The option you chose and a paragraph explaining why you chose it that discusses the pros and cons of your choice.

  2. The URL of your GitHub repo

  3. The URL of your application