大网数据广告活动
服务器运维问答

Multicast between kubernetes pods

· 52CE 我爱测

I have an app in which there are a few tasks that communicate using publisher/subscriber. The main problem is that the pub/sub discovery works by multicasting information to the other tasks, but when I deploy those tasks in k8s, …

问题原文

原帖链接 · Francisco · CC BY-SA 4.0

I have an app in which there are a few tasks that communicate using publisher/subscriber. The main problem is that the pub/sub discovery works by multicasting information to the other tasks, but when I deploy those tasks in k8s, the pods can't multicast between them as they have private IPs assigned.

I have read about using services, but it didn't convince me because I would lose the peer to peer structure.

Is there a way to enable 2 pods from the same cluster to see each other using multicast? For additional info, the pub/sub I am using is Zenoh.

已采纳解答

原帖链接 · Francisco · CC BY-SA 4.0

Thanks to SYN comment I have been able to find a way. If you use microK8s distribution is quite straightforward, this link contains a good guide: https://microk8s.io/docs/addon-multus.

It is also supposed to be possible with K3s by installing flannel and then multus, but I haven't tried it so I can't assure it.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2022-10-25)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。