I have set up an internal TCP/UDP load balancer with VM instance group backends.
I am on the section that relates to Test connection from client VM.
Here, I don't quite understand the last step, which says:
If you add a service label to the internal forwarding rule, you can use internal DNS to contact the load balancer using its service name.
curl http://web-test.fr-ilb.il4.us-west1.lb.sandbox-neos.internal
When I run the above command, I get the following error:
curl: (6) Could not resolve host: web-test.fr-ilb.il4.us-west1.lb.sandbox-neos.internal
The service label of my forwarding rule is fr-ilb-label
. Should I replace the name of my service label in the above command? If yes, I am not quite able to fathom what I should replace it with for I tried different options but it doesn't work:
curl http://web-test.fr-ilb-label.us-west1.lb.sandbox-neos.internal
The following is the description of my forwarding rule:
@cloudshell:~ (ilb-test-356804)$ gcloud compute forwarding-rules describe fr-ilb --region=us-west1
IPAddress: 10.1.2.99
IPProtocol: TCP
allowGlobalAccess: true
backendService: https://www.googleapis.com/compute/v1/projects/ilb-test-356804/regions/us-west1/backendServices/be-ilb
creationTimestamp: '2022-09-06T19:54:49.330-07:00'
description: ''
fingerprint: 7wff1x8n8_g=
id: '7457513772638648598'
ipVersion: IPV4
kind: compute#forwardingRule
labelFingerprint: iLh3JCVj-vI=
labels:
service-label: fr-ilb-label
loadBalancingScheme: INTERNAL
name: fr-ilb
network: https://www.googleapis.com/compute/v1/projects/ilb-test-356804/global/networks/lb-network
networkTier: PREMIUM
ports:
- '80'
- '8008'
- '8080'
- '8088'
region: https://www.googleapis.com/compute/v1/projects/ilb-test-356804/regions/us-west1
selfLink: https://www.googleapis.com/compute/v1/projects/ilb-test-356804/regions/us-west1/forwardingRules/fr-ilb
subnetwork: https://www.googleapis.com/compute/v1/projects/ilb-test-356804/regions/us-west1/subnetworks/lb-subnet