An internal load balancer gives applications in the same Google Cloud VPC network an IP address for reaching a GKE Service. It selects that address from the cluster’s VPC subnet rather than assigning an external IP address. section 10.2.1
In GKE, internal and external network load balancers handle TCP/L4 traffic. Both use Google Cloud forwarding rules to route traffic to a Kubernetes node. Choose an internal load balancer for traffic originating within the VPC; an external load balancer serves traffic from outside it. HTTP(S) load balancing instead uses an Ingress resource. section 10.2.1
apiVersion: v1
kind: Service
metadata:
name: ilb-service
annotations:
cloud.google.com/load-balancer-type: "Internal" #1
labels:
app: hello
spec:
type: LoadBalancer #2
selector:
app: hello
ports:
- port: 80
targetPort: 8080
protocol: TCP
Set the Service type to LoadBalancer and add the cloud.google.com/load-balancer-type: "Internal" annotation. The example exposes TCP port 80 and targets port 8080 on selected workloads. section 10.2.1
