Wasn’t sure that my discussion topic is an issue, so I came here first.
Where the issue has happened:
The context contains “RestAPI” role which is a cluster-client and Akka-Cluster which is a receptionist.
All based on Kubernetes with the akka-management release 1.0.0.
On cluster start, discovery found the “management” port (8558), netty (2551) and RestAPI service with 8080 as well.
Next step was to ask the RestAPI service to show it seed-nodes via bootstrap context and 404 error comes back due to the RestAPI shouldn’t contain that inner context.
To target for the specific bootstrap contacts, there should have been a config. And it was:
# The portName passed to discovery. This should be set to the name of the port for Akka Management
# If set to "" None is passed and ${akka.management.http.port} is assumed.
port-name = ""
In ClusterBootstrapSettings port-name is used like: val portName: Option[String] = discoveryConfig.optValue("port-name")
I’ve changed “port-name” on “management” and cluster stood up.
It could be any port-name that is used for cluster “management” (nodes resolving).
Question: Maybe it should be encapsulated somehow?
I’m not quite sure I understand what you are describing.
Cluster Bootstrap should indeed use Discovery to find the peer nodes, and then query the Akka Management port on the peer nodes to find any existing seed nodes.
Are you saying Cluster Bootstrap erroneously contacted your RestAPI port (8080, where it got a 404) instead of the management port (8558)? That would indeed be wrong. Can you share the logging that shows what was going on?
Deployment based on k8s and all services like API(cluster-client) and CLUSTER(cluster-receptionist) are in the same k8s domain. In that way, kubernetes-discovery finds all services inside one k8s domain area and tries to get contact-points by management port and endpoint, which is not inside of API service and shouldn’t be there, but request (8558/bootstrap/…) to API causes the “not found” error.
If API and CLUSTER are based on k8s but in the different domains - API requests to CLUSTER will be forbidden.