<h1><strong>Question</strong></h1>
<p>What is the maximum number of ports an (external) LB Service can support on GKE?</p>
<h1><strong>Background</strong></h1>
<p>We are experiencing timeouts against a LB Service when the port count gets higher than ~30.</p>
<p>The timeout suggests to me that firewall rules are not being created for the Service when new TCP ports are patched in. However, manually adding relevant firewall rules does not fix the issue.</p>
<p>As such, it is possible that the Service itself is failing to route traffic to relevant pods when the Service port count is too high.</p>
<p>These <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing#shared_VIP" rel="nofollow noreferrer">docs</a> indicate a 50 port limit applies to internal LBs. Wondering if this is the same for external?</p>
<h1><em><strong>More Info</strong></em></h1>
<p>The port is definitely created on the Service:</p>
<pre><code>$ kubectl get svc -n router-proxy | tr ',' '\n' | grep 52220                                                                                       
52220:30142/TCP
</code></pre>
<p>We can hit the Pods using their Pod IPs but we cannot hit them using the Service.</p>

<p>Found the answer using <code>kubectl describe svc ...</code>. Maximum seems to be 100 ports per Service.</p>
<pre><code>  Warning  SyncLoadBalancerFailed  23s (x272 over 97m)    service-controller  (combined from similar events): Error syncing load balancer: failed to ensure load balancer: googleapi: Error 413: Value for field 'resource.allowed[0].ports' is too large: maximum size 100 element(s); actual size 494., fieldSizeTooLarge
</code></pre>
