In order to maintain state we use a managed Postgres instance in Google Cloud. You can create it here Our instance at Project EPIC had the following configuration:
- Database version: PostgreSQL 9.6
- Region:us-central1
- Zone: us-central1-c
- Instance ID: epic-event
- Private and public IP enabled
- Memory: 3.75 Gb
- CPU: 1 vCPU
- Storage: 10 GB in SSD
- No backups
- Single zone availability (reduces costs)
Remember to set the password and user (postgres by default) in the corresponding Kubernetes secret.
gcloud sql connect epic-event --user=postgres --quiet
- Create databases
CREATE DATABASE annotationsdb;
CREATE DATABASE eventsdb;
- Create annotations tables (see annotationsdb.sql)
- Create events tables (see eventsdb.sql)