在 Kubernetes 中 运行 时,Apache Storm UI 和工作人员无法解析 nimbus

Apache Storm UI and workers can't resolve nimbus when running in Kubernetes

我设置了一个 storm nimbus 部署和另一个 storm supervisor 部署(和一个 UI),但是 supervisor 死了,因为它无法解析 nimbus ...它总是在 pod FQDN 上注册自己:

2018-06-06 17:07:01.935 o.a.s.n.NimbusInfo main [INFO] Nimbus figures out its name to storm-nimbus-hl874

如您所见,这是 replicationcontroller 中的 pod 名称,它不能被其他 pods...

Supervisor 配置具有我创建的无头服务的正确地址,它是可解析和可连接的,但一旦它启动,它就会从 Zookeeper 查询灵气名称,即 FQDN,忽略配置文件。所以我假设灵气种子实际上并不是告诉主管或 UI 哪里可以找到灵气的方法。

不确定如何解决这个问题或是否有解决方法。

我可以创建一个带有无头服务的 statefulset,其中 pod 和服务具有相同的名称,但这看起来真的很难看。

这是 Nimbus 计算其主机名的地方 https://github.com/apache/storm/blob/c9b73a5e3ffcfc458772100dc6bd62ad1cf468de/storm-client/src/jvm/org/apache/storm/nimbus/NimbusInfo.java#L56

您应该可以设置 https://github.com/apache/storm/blob/master/storm-client/src/jvm/org/apache/storm/Config.java#L1108 来覆盖它。