Relative Content

Tag Archive for google-cloud-platformgoogle-cloud-compute-engine

health check not accessible GCP

I have a managed instance group in google cloud with one instance. I use a container image for my app. I have HTTP(S) traffic disallowed. A load balancer is pointing to it. I have setup a health check, when I SSH into the instance and do curl localhost:80/health I get a response, so the container boots up correctly. However the load balancer shows the instance to be unhealthy. I have also setup an ingress firewall rule for the appropriate ip ranges (130.211.0.0/22, 35.191.0.0/16) and port (tcp:80).
I create the instance from a template that is created with this command:
gcloud compute instance-templates create-with-container magnificent-monolith-try4 --project=my-proj --machine-type=e2-micro --network-interface=network=default,network-tier=PREMIUM --region=europe-west1 --maintenance-policy=MIGRATE [email protected] --scopes=https://www.googleapis.com/auth/cloud-platform --tags=lb-health-check,allow-health-check --container-image=europe-west1-docker.pkg.dev/my-proj/docker-repository/magnificent-monolith:010c59f2ad7a3a6ff86339cc320785bd9cc41615 --container-restart-policy=always --container-env=end=dev --no-shielded-secure-boot --boot-disk-auto-delete --boot-disk-size=10 --create-disk=auto-delete=yes,mode=rw,name=try-disk,image=projects/cos-cloud/global/images/cos-stable-109-17800-147-60 --shielded-vtpm --shielded-integrity-monitoring