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.
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#
I messed up! If you completed the 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.
Poddefinition for Postgres with that makes use of a
PersistentVolumeClaimto keep data safe.
Option 2: A Scalable Postgres Deployed with
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).
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.
Create a Cloud SQL instance outside of Kubernetes and connect it to your Django application.
The option you chose and a paragraph explaining why you chose it that discusses the pros and cons of your choice.
The URL of your GitHub repo
The URL of your application