Skip to main content

Posts

Auto Scaling

Autoscaling Overview Managed instance groups offer autoscaling capabilities that allow you to automatically add or remove instances from a managed instance group based on increases or decreases in load. Autoscaling helps your applications gracefully handle increases in traffic and reduces cost when the need for resources is lower. You just define the autoscaling policy, and the autoscaler performs automatic scaling based on the measured load. Autoscaling works by scaling your instance group in or out. That is, it adds more instances to your instance group when there is more load (scaling out) and removes instances when the need for instances is lowered (scaling in). Objectives In this lab, you learn how to perform the following tasks: Create a custom image for a web server Create an instance template based on the custom image Create a managed instance group Create a load balancer Stress test the autoscaler What you'll need To complete this lab, you'll ...

instances and firewall with GCP CLI

In Cloud Shell, paste and run the following commands to create a few instances: for i in {1..3}; \ do \ gcloud compute instances create "nginxstack-$i" \ --machine-type "f1-micro" \ --tags nginxstack-tcp-443,nginxstack-tcp-80 \ --zone us-central1-f \ --image "https://www.googleapis.com/compute/v1/projects/bitnami-launchpad/global/images/bitnami-nginxstack-1-10-2-0-linux-debian-8-x86-64" \ --boot-disk-size "200" --boot-disk-type "pd-standard" \ --boot-disk-device-name "nginxstack-$i"; \ done Run the following command to create a firewall rule to allow external traffic to the instances: gcloud compute firewall-rules create nginx-firewall \ --allow tcp:80,tcp:443 \ --target-tags nginxstack-tcp-80,nginxstack-tcp-443

Getting Started with Kubernetes Engine | GCP

Getting Started with Kubernetes Objectives In this lab you create a Kubernetes Engine cluster containing several containers, each containing a web server. You place a l oad balancer in front of the cluster and view its contents. In this lab, you learn how to perform the following tasks: Provision a  Kubernetes  cluster using  Kubernetes Engine. Deploy and manage Docker containers using  kubectl .Sign in to the Google Cloud Platform (GCP) Console Make sure that you have access to a standard web browser. The Google Chrome browser is recommended Sign in to the Google Cloud Platform Console by using the username and password  Confirm that needed APIs are enabled Make a note of the name of your GCP project. This value is shown in the top bar of the Google Cloud Platform Console. It will be of the form  qwiklabs-gcp- followed by hexadecimal numbers. In the GCP Console, on the  Products & Services  ( ) menu, click...