深入解析DC/OS 1.8 – 高可靠的微服务及大数据管理平台

  从Mesos上我们看出这两个容器是在两个节点上的

  登入Docker的容器,ping另外一个CNI的mesos的IP是没有问题的。

  ip-10-0-1-78 cni # docker ps

  CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

  e7908deb3017 nginx "/bin/sh -c 'env; ip " 28 minutes ago Up 28 minutes 80/tcp, 443/tcp mesos-b3fbe6d9-236a-4856-a986-9babbba9c02c-S2.e3c96fa7-b5ff-4af6-9099-bbed399c7c37

  a992929fb0d1 nginx "nginx -g 'daemon off" 6 hours ago Up 6 hours 443/tcp, 0.0.0.0:4989->80/tcp mesos-b3fbe6d9-236a-4856-a986-9babbba9c02c-S2.fca41f8d-816c-49cd-9b19-ba059b95e885

  8032756dd66e nginx "nginx -g 'daemon off" 6 hours ago Up 6 hours 443/tcp, 0.0.0.0:27003->80/tcp mesos-b3fbe6d9-236a-4856-a986-9babbba9c02c-S2.c0fdd3db-6f17-41d3-ab05-6f2d4d0bfa13

  ip-10-0-1-78 cni # docker exec -it e7908deb3017 bash

[email protected]:/# ip addr

  1: lo: <loopback,up,lower_up>mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1

  link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

  inet 127.0.0.1/8 scope host lo

  valid_lft forever preferred_lft forever

  inet6 ::1/128 scope host

  valid_lft forever preferred_lft forever

  51: [email protected]: <broadcast,multicast,up,lower_up>mtu 1420 qdisc noqueue state UP group default

  link/ether 02:42:09:00:03:82 brd ff:ff:ff:ff:ff:ff

  inet 9.0.3.130/25 scope global eth0

  valid_lft forever preferred_lft forever

  inet6 fe80::42:9ff:fe00:382/64 scope link

  valid_lft forever preferred_lft forever

[email protected]:/# ping 9.0.2.13

  PING 9.0.2.13 (9.0.2.13): 56 data bytes

  64 bytes from 9.0.2.13: icmp_seq=0 ttl=62 time=0.709 ms

 

  64 bytes from 9.0.2.13: icmp_seq=1 ttl=62 time=0.535 ms