Skip to content

Commit

Permalink
Merge pull request kubernetes-retired#346 from tssurya/update-proxy-doc
Browse files Browse the repository at this point in the history
Add info about allocateNodePorts=false to the service-proxy docs
  • Loading branch information
k8s-ci-robot authored Oct 10, 2022
2 parents ede4d3b + 12f9b5f commit e8ab99a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion doc/service-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ balancer IP as the destination IP rather than DNAT'ing it), thus
allowing "Direct Server Return" (ie, the node can send the reply
packets directly back to the original client rather than needing to
pass them back through the load balancer, since the load balancer
doesn't need to undo anything).
doesn't need to undo anything). In this case, it makes sense to create
the LoadBalancer type service with `.spec.allocateLoadBalancerNodePorts`
set to `false`. That will ensure no nodePorts are allocated to the service.

Unlike cluster IPs, load balancer IPs are considered to be external to
the cluster, and the service proxy does not "own" them in the way it
Expand Down Expand Up @@ -287,6 +289,10 @@ service proxy implementations should probably just copy that code
exactly for now. (It is not clear if any cloud load balancer
implementations actually parse the returned JSON?)

Note that setting `.spec.allocateLoadBalancerNodePorts` to `false` for a
LoadBalancer type service does not have any effect on the allocation of
`.spec.healthCheckNodePort`.

## Service Affinity

If a service has `.spec.sessionAffinity` set to `ClientIP`, then the
Expand Down

0 comments on commit e8ab99a

Please sign in to comment.