GCP | How to create Health Checks for VM

GCP provides health checks to check response from VM instance. This tutorial describes how to create and use health checks for load balancers.

  • Login to Google Cloud Console
  • Click Activate Cloud Shell to open Cloud Shell.
  • Create a health check with following command
  • 
    gcloud compute health-checks create tcp test-health-chk \
        --port 80
    
    

  • Successful execution of command should produce output as below
  • 
    Created [https://www.googleapis.com/compute/v1/projects/*******/global/healthChecks/test-health-chk].
    NAME             PROTOCOL
    test-health-chk  TCP
    
    

    Categories: GCP