GCP Classroom notes 09/Oct/2024

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
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a comment

Turn on JavaScript to leave a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Floating Social Media Icons by Acurax Wordpress Designers
Exit mobile version
%%footer%%