I have followed through the example at getting started overlay and i have a simple query. Is it possible to use multi-host networking feature using overlay without creating a swarm cluster
? I don't want to use third party plugins like weave etc. I want to use docker native networking support for this.
I have 3.16+ kernel
running RHEL and docker 1.9
.
Yes, it is possible: see "Lab 6: Docker Networking".
The key part of an overlay network is the discovery service, like for instance Consul.
An overlay network requires a key-value store.
The store maintains information about the network state which includes discovery, networks, endpoints, ip-addresses, and more. Engine supports Consul, etcd, and ZooKeeper (Distributed store) key-value store stores.
The article "Docker Networks: Discovering Services on an Overlay" lay some criticisms about the current service discovery tools which are not built for individual container registration or discovery.
Overlay uses KV stores under the covers to model the network topology and enable cross-host container to container communication. It does not provide SRV record resolution.
The rub is that in an overlay network every container has its own IP address.
So, the only way you could make this work is by running Consul agents inside of every container on the network that contributes a service. That is certainly not transparent to the developer, or compatible with off-the-shelf images.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With