0

Suppose, I have 3 Containers running on a single host and we are making a Hadoop cluster, 1 is master and other 2 are slaves(Namenode and datanodes)

And,we need to map ports:

docker run -itd -p 50070:50070 --name master centos:bigdata

docker run -itd -p 50075:50075 -p 50010:50010 --name slave1 centos:bigdata

Now ports 50075,50010,50070 are busy on host, we cannot map them for slave2

And if we do some random mapping like,

docker run -p 123:50075 -p 234:50010 --name slave2 centos:bigdata

Then, containers won't be able to communicate and it won't work.

So, Can flannel solve this problem?

paresh494
  • 5
  • 2
  • There are multiple Github repos and blogs not using Flannel. ... – OneCricketeer Sep 02 '17 at 04:45
  • I will look for them..but I want some layman idea of how flannel solves it? – paresh494 Sep 02 '17 at 05:22
  • Where did you find a reference that it did solve it? Besides, Flannel is commonly used in Kubernetes. It just uses reverse proxy lookups and dynamic port allocation. Traefik is an example Docker image for this – OneCricketeer Sep 02 '17 at 05:25
  • Check this https://github.com/big-data-europe/docker-hadoop/blob/master/docker-compose.yml – Tarun Lalwani Sep 02 '17 at 05:44
  • @cricket_007 Yes.. that dynamic port allocation part.. flannel will encapsulate packet and forward it to destined service automatically, but it works between hosts.. can it happen if containers are on single host? I'm not yet hands-on with flannel – paresh494 Sep 02 '17 at 08:56

0 Answers0