<p>I want to install <code>jenkins</code> using its official helm <a href="https://github.com/helm/charts/tree/master/stable/jenkins" rel="nofollow noreferrer">chart</a> on GKE.</p>

<p>I want to expose the agent service (port 50000) using LoadBalancer (will be hitting it from some remote agents).</p>

<p>Will <a href="https://github.com/helm/charts/blob/master/stable/jenkins/values.yaml#L194" rel="nofollow noreferrer">this</a> annotation</p>

<pre><code>service.beta.kubernetes.io/load-balancer-source-ranges: "172.0.0.0/8, 10.0.0.0/8"
</code></pre>

<p>also help secure a GCP load balancer, or is it only applicable on AWS?</p>

<p>Will the agents initiated internally in GKE still have to pass through the internet to reach the service, or will they be routed internally to the corresponding agent service?</p>

pkaramol
<p>If you are asking about capability to whitelist firewalls using 'loadBalancerSourceRanges' parameter <code>service.beta.kubernetes.io/load-balancer-source-ranges</code> annotation is supported and often use on GCP.</p>

<p>Here is example Loadbalancer service with defined source-ranges:</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: example-loadbalancer
  annotations:
    service.beta.kubernetes.io/load-balancer-source-ranges: "172.0.0.0/8, 10.0.0.0/8"
spec:
  type: LoadBalancer
  ports:
  - protocol: TCP
    port: 8888
    targetPort: 8888
</code></pre>

<p>Unlike Network Load Balancing, access to TCP Proxy Load Balancing cannot be controlled by using firewall rules. This is because TCP Proxy Load Balancing is implemented at the edge of the Google Cloud and firewall rules are implemented on instances in the data center.
<a href="https://i.stack.imgur.com/Obbph.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Obbph.png" alt="enter image description here"></a>
Useful documentations: <a href="https://cloud.google.com/load-balancing/docs/network" rel="nofollow noreferrer">gcp-external-load-balancing</a>, <a href="https://cloud.google.com/load-balancing/docs/network" rel="nofollow noreferrer">load-balancing</a>.</p>
