AKKA needs port forwarding in kubernetes service

12/3/2019

I'm trying to work with Akka service discovery in a kubernetes cluster. Both pods are labeled and Akka can get the right address to connect to the pods. But when trying to connect the following error occurs: ...http://ip.namespace.pod.cluster.local:8558)] Connection attempt failed. Backing off new connection attempts for at least 100 milliseconds. This error resolved once I enabled port forwarding to port 8558 on service level. I was able to set up a tcp connection to the other pod when I was logged in to a pod using the given address. Any reason why it does work when I add the ports to the service/ why akka would even us the service to connect to the other pods?

--
akka
java
kubernetes

1 Answer

12/3/2019
akka.management {
  http {
    hostname = "127.0.0.1"
    hostname = ${?HOSTNAME}
    bind-hostname = "0.0.0.0"
    port = 8558
    bind-port = 8558
  }

Has the bind port and the port configured correctly in conf file ?, Because the specific configuration is the one which binds the host to 0.0.0.0:8558 'internally' and which helps in the mapping.

-- redhatvicky
Source: StackOverflow