Support internal Load Balancing for Kubernetes stacks

On the server v0.4.21 has introduced a better way of dealing with
intra-stack networking: if the user can specify a list of endpoints
exposed internally, we now can setup a ClusterIP for this to avoid the
pitfalls of DNS-based load balancing.
This exposes the feature using the "Expose" compose field, and adds an
extra x-internal-service-type field to explicitly define how intra-stack
networking is handled on a service.

Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
This commit is contained in:
Simon Ferquel
2019-04-08 10:37:18 +02:00
parent 5bbb56bfee
commit cad20c759f
3 changed files with 220 additions and 28 deletions

View File

@ -0,0 +1,9 @@
version: "3.7"
services:
test:
image: "some-image"
expose:
- "1" # default protocol, single port
- "2-4" # default protocol, port range
- "5/udp" # specific protocol, single port
- "6-8/udp" # specific protocol, port range