GKE Editions
- GKE has two editions Refer Here
- Standard Edition
- Enterprise Edition
GKE Addons
- Backup for GKE
- Ray (AI/ML apps on k8s)
Lab Setup
- Create an auto pilot gke cluster
- Refer Here for sample application with docker compose file
- This application has an api and db
Options for realizing the above architecture in k8s
Option 1: Everything in GKE
- The container images can be in Dockerhub or GCR
- API is stateless and for deploying this lets use a k8s deployment
- database is postgres and it needs a persistent volume
Storage classes in GKE
- Default Storage Class: That provisions a Persistent Disk using standard or SSD disktypes
- Custom Storage Class:
- Dynamic Provisioning:
- Access Mode:
- Read write once (RWO)
- Read only many (ROX)
- ReadWriteMany (RWX) (This is not supported by persistent disk, but supported by filestore or other storage backends)
Persistent Volumes in GKE
- Creating Persistent Volumes is done during static provisioning
Solution for db
- Lets create a postgres database with environmental variables as a stateful set with pvc
- Refer Here for initial version of spec with statefulset and config map
- Refer Here for the additon of statefulset
- Refer Here for fix
Option 2: Database in Cloud SQL
- We will discuss in next session
