You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
To enable communication between container in a multi node setup, we need to be able to integrate with flannel:
This is what is discovered so far with my testing:
First we will start 2 container with the docker:dnd image:
docker run -it --name node1 --privileged docker:dind
docker run -it --name node1 --privileged docker:dind
We will assume for the rest of the tutorial that node1 have 172.17.0.2 as ip address
and node2 172.17.0.3, this may change depending on your docker setup you can inspect node1 and node2 to get their ip addresse.
Then on the first node we initialize an etcd instance:
docker run --it --network flannel-net1 busybox:latest
And you should be able to ping them in both way!
While this solution seems good, after further research we only have 256 IPv4 addresse available for the network, meaning we can't really scale well, we should use ipv6 by default to be able to scale well the number of instance available in one node.
Flannel doesn't seems to support ipv6 so we should take a look into calico.
But having a flannel support will be nice in the first place
The text was updated successfully, but these errors were encountered:
Yeah but be aware that it may cause network performance issue.
I'll recommend to use end to end SSL/TLS between your services even for internal communications
Is your feature request related to a problem? Please describe.
To enable communication between container in a multi node setup, we need to be able to integrate with flannel:
This is what is discovered so far with my testing:
First we will start 2 container with the docker:dnd image:
We will assume for the rest of the tutorial that node1 have 172.17.0.2 as ip address
and node2 172.17.0.3, this may change depending on your docker setup you can inspect node1 and node2 to get their ip addresse.
Then on the first node we initialize an etcd instance:
We need to add a new member for the etcd cluster to prepare the 2nd node:
Then on the node2 we can start the 2nd etcd instance:
Now we can start flannel !
On both node:
We can check if everything is working by loggin the containers.
Now that we have etcd and flannel up and running we can create docker network:
First we need to get the subnet that flannel choosed for the node, to do so we can cat
/run/flannel/subnet.env
For my first node it show 10.244.40.1/24
So we can create the docker network on the first node as follow:
On the second node i have a different subnet, dont forget to cat
/run/flannel/subnet.env
to get the values10.244.82.1/24
Now we can create container on both node:
And you should be able to ping them in both way!
While this solution seems good, after further research we only have 256 IPv4 addresse available for the network, meaning we can't really scale well, we should use ipv6 by default to be able to scale well the number of instance available in one node.
Flannel doesn't seems to support ipv6 so we should take a look into calico.
But having a flannel support will be nice in the first place
The text was updated successfully, but these errors were encountered: