Google cloud load balancing instance status - google-compute-engine

I've tried few different setups of HTTP load balancing in google compute engine.
I used this as a reference :
https://cloud.google.com/compute/docs/load-balancing/http/cross-region-example
And I'm at scenario with 3 instances where I simulate the outage on one of them.
And I can see that one instance is not healthy which is great, so my question would be how can I see which one of them is not up. I mean when this is a real scenario I want to immediately know which one is it.
Any suggestions?

You can use the gcloud tool to get detailed health information. Based on that tutorial, I would run:
gcloud compute backend-services get-health NAME
I am not sure how to view this information in the developer console.
See more:
https://cloud.google.com/compute/docs/load-balancing/http/backend-service#health_checking

Related

Google Compute API Anonymous Requests

Just noticed I have thousands of anonymous requests hitting all of the compute engine api list endpoints. I have no instances running and I'm only using Firebase and Cloud Build, Source, and Registry. Please see attached screenshot of API metrics report.
Any reason for this?
compute engine metrics
On the backend there are certain API calls needed to make sure that your project is healthy, these "Anonymous" requests represent an account used by the backend service making health checks.
Anonymous API calls (this could be just Compute Engine “list” calls) doesn't imply having enabled something from your side. A lot of different sections in the Console make calls to the Compute Engine API and there’s no easy way to figure out which section made the calls, but they are expected.
These kind of "Anonymous" Compute Engine APIs are part of the internal Monitoring tools needed to make sure that your project is healthy and are randomly triggered. These metrics might eventually disappear and come back throughout the project life.

I failed to start my VM instance (through the web browser), it is giving resource unavailability error

I failed to start my instance (through the web browser), it gave me the error:
"The zone 'projects/XXXXX/zones/us-central1-f' does not have enough resources available to fulfill the request. Try a different zone, or try again later."
Can anyone suggest some resolution to it.
The share error message meaning that you’re having a temporary resource stock-out issue in that particular zone. I would like to point you to this post made by "Paul Nash" on 4/18/17, who thoroughly explained the resource stock-out issue at Google Cloud Platform (GCP).
As a workaround, I would recommend that you try a different zone or to try later if you are looking to get resources in the same zone as those issues are to be expected transiently.
We also recommend deploying and balancing your workload across multiple zones or regions to reduce the likelihood of an outage. For more details visit the following link. Please review the documentation which outlines how to build resilient and scalable architectures on Google Cloud Platform.
Again, we want to offer our sincerest apologies. We are working hard to resolve this and make this an exceptionally rare event.

Add additional disks through metadata on Goocle Compute Engine

I want to build a Google Cloud image using Packer, but can't seem to find a way for packer to add additional disks. This is required as want a persistent disk for application to store data on it.
Is it something that can be done through startup_script or any other way?
From a quick glance at the GCE API documentation it looks like images only can contain one device, the boot device.

GCE autoscaling by GKE resource reservation

According to Kubernetes documentation,
If you are using GCE, you can configure your cluster so that the number of nodes will be automatically scaled based on:
CPU and memory utilization.
Amount of of CPU and memory requested by the pods (called also reservation).
Is this actually true?
I am running mainly Jobs on my cluster, and would like to spin up new instances to service them on demand. CPU usage doesn't work well as a scaling metric for this workload.
From Google's CKE documentation, however, this only appears to be possible by using Cloud Monitoring metrics -- relying on a third-party service that you then have to customize. This seems like a perplexing gap in basic functionality that Kubernetes itself claims to support.
Is there any simpler way to achieve the very simple goal of having the GCE instance group autoscale based on the CPU requirements that I'm quite explictly specifying in my GKE Jobs?
The disclaimer at the bottom of that section explains why it won't work by default in GKE:
Note that autoscaling will work properly only if node metrics are accessible in Google Cloud Monitoring. To make the metrics accessible, you need to create your cluster with KUBE_ENABLE_CLUSTER_MONITORING equal to google or googleinfluxdb (googleinfluxdb is the default value). Please also make sure that you have Google Cloud Monitoring API enabled in Google Developer Console.
You might be able to get it working by standing up a heapster instance in your cluster configured with --sink=gcm (like this), but I think it was more of an older proof of concept than a well-maintained, production-grade configuration.
The community is working hard on a better, more-fully-supported version of node autoscaling in the upcoming 1.3 release.

Large number of Requests and Errors on GCE

I've been struggling with a GCE issue for a while and I would like to ask for some help. On the developer console I see large number of API requests that I don't know where originated from. I'm pretty sure that I'm not running any services / jobs that can burn the API quota. I see many errors as well. All my VM instances and other resources are working fine, but the issue concern me. I linked a few screens from the dev console about whats happening. I would really appreciate any help!
Thanks!
https://lh4.googleusercontent.com/-7_HaZLZxvF0/VC14TMVCKoI/AAAAAAAAE6Q/0b8NvjxttMQ/s1600/01.png
https://lh5.googleusercontent.com/-TdXJu2VQ7qA/VC14mcy2AOI/AAAAAAAAE6g/O8VPcoRJpfc/s1600/03.png
IT seems like you're using the Google Compute Engine API. When using gcloud compute commands or the Google Compute Engine console tool, you're making requests to the API. Also check if you have an app that uses the service account to make requests to GCE. You can visit this link for more information