<p>Do you know what is the annotation that we can use it on GKE to make a LoadBalancer service internal?. For example Azure (and AWS) supports the following annotation (shown in the YAML code snippet) to make a LoadBalancer service internal. I couldn’t find equivalent of it on GKE. For example naturally one may expect <strong>gcp-load-balancer-internal</strong> as the equivalent annotation on GKE; unfortunately it is not. Here is the Azure and AWS documentation for it, I am looking equivalent of it on GKE.</p>
<ul>
<li><a href="https://learn.microsoft.com/en-us/azure/aks/internal-lb" rel="nofollow noreferrer">Azure: internal LoadBalancer</a></li>
<li><a href="https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/guide/service/annotations/" rel="nofollow noreferrer">AWS: annotations</a></li>
</ul>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Service
metadata:
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-internal: &quot;true&quot;
    service.beta.kubernetes.io/azure-load-balancer-internal: &quot;true&quot;
</code></pre>

Satyan
<p>The equivalent can be found <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing#create" rel="nofollow noreferrer">here</a>.</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: ilb-service
  annotations:
    networking.gke.io/load-balancer-type: &quot;Internal&quot;
  labels:
    app: hello
spec:
  type: LoadBalancer
  selector:
    app: hello
  ports:
  - port: 80
    targetPort: 8080
    protocol: TCP
</code></pre>
