gpt4 book ai didi

kubernetes - Kubernetes Pod无法在机器之间连接

转载 作者:行者123 更新时间:2023-12-02 12:23:59 25 4
gpt4 key购买 nike

我在这里使用了node.yaml和master.yaml文件:http://kubernetes.io/v1.1/docs/getting-started-guides/coreos/coreos_multinode_cluster.html在3个运行CoreOS的裸机上创建多节点集群。但是,不同节点上的Pod无法相互通信。如有任何建议或建议,我将不胜感激。我很茫然。

我有三个运行rabbitmq的 pod :

thuey:~ thuey$ kbg pods | grep rabbitmq
rabbitmq-bootstrap 1/1 Running 0 3h
rabbitmq-jz2q7 1/1 Running 0 3h
rabbitmq-mrnfc 1/1 Running 0 3h

一台机器上有两个 pods :
kbd node jolt-server-3 | grep rabbitmq
thuey rabbitmq-bootstrap 0 (0%) 0 (0%) 0 (0%) 0 (0%)
thuey rabbitmq-jz2q7 0 (0%) 0 (0%) 0 (0%) 0 (0%)

另一个Pod在另一台机器上:
thuey:~ thuey$ kbd node jolt-server-4 | grep rabbitmq
thuey rabbitmq-mrnfc 0 (0%) 0 (0%) 0 (0%) 0 (0%)

我可以成功从rabbitmq-bootstrap ping到rabbitmq-jz2q7:
root@rabbitmq-bootstrap:/# ping 172.17.0.5
PING 172.17.0.5 (172.17.0.5) 56(84) bytes of data.
64 bytes from 172.17.0.5: icmp_seq=1 ttl=64 time=0.058 ms
64 bytes from 172.17.0.5: icmp_seq=2 ttl=64 time=0.035 ms
64 bytes from 172.17.0.5: icmp_seq=3 ttl=64 time=0.064 ms
64 bytes from 172.17.0.5: icmp_seq=4 ttl=64 time=0.055 ms
^C
--- 172.17.0.5 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 0.035/0.053/0.064/0.010 ms

但我不能ping Rabbitmq-mrnfc:
root@rabbitmq-bootstrap:/# ping 172.17.0.8
PING 172.17.0.8 (172.17.0.8) 56(84) bytes of data.
From 172.17.0.2 icmp_seq=1 Destination Host Unreachable
From 172.17.0.2 icmp_seq=2 Destination Host Unreachable
From 172.17.0.2 icmp_seq=3 Destination Host Unreachable
From 172.17.0.2 icmp_seq=4 Destination Host Unreachable
^C
--- 172.17.0.8 ping statistics ---
5 packets transmitted, 0 received, +4 errors, 100% packet loss, time 4000ms
pipe 4

最佳答案

您使用的指南不包含有关裸机的说明。您需要实现Kubernetes的networking model的联网(例如法兰绒,印花布)。您可以检查table of solutions以获取有关不同IaaS / OS /网络组合的入门指南。

关于kubernetes - Kubernetes Pod无法在机器之间连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34623739/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com