GCP Classroom notes 10/Sep/2024

Application Load Balancer

  • This load balancer is http aware, we can do path based routed, name based routing
  • Refer Here for official docs

Path Based Routing in GCP

  • Lets create two custom images
  • Then we will create two instance groups one hosting browny and other hosting repairs
  • Now lets create an external application load balancer to route requests to
    • browny instance group if the path contains /browny/*
    • repairs instance group if the path contains /repairs/*
  • For screenshots or creation using console refer classroom video
  • We can also do header and query string based routing decisions Refer Here

Stateful Managed Instance Groups

  • In stateful instance group, specfic data or state of the instances (like attached disks, ip addresses or metadata) is retained across restarts, updates and recreations
  • This is useful where certain pars of instance need to persist evn if the instance is recreated
  • UseCases:
    • Databases
    • Classic Applications with local data

Managing Virtual Machines using gcloud CLI

  • Lets try creating a compute engine instance from gcloud cli
  • instance creation Refer Here
#!/bin/bash

# lets get the debain image information
gcloud compute images list --filter="family:debian-12"

# Create the vm instance

gcloud compute instances create my-debian \
    --image-family=debian-12 \
    --image-project=debian-cloud \
    --zone=us-central1-f \
    --machine-type=e2-micro \
    --tags=http-server

gcloud compute instances delete my-debian  --zone=us-central1-f

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

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

Please turn AdBlock off
Social Network Integration by Acurax Social Media Branding Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube