Has anyone succeeded in Keycloak version >=17 cluster in Docker Swarm?
As per documentation, dns.DNS_PING in enabled by --cache-stack=kubernetes and -Djgroups.dns.query, which I set to my swarm service name JAVA_OPTS_APPEND=-Djgroups.dns.query=stage_keycloak_cluster.
This did not work, two independent clusters as a result.
In debug logs i see:
DEBUG [org.jgroups.protocols.dns.DNS_PING] (jgroups-16,stage_keycloak_cluster-60990) stage_keycloak_cluster-60990: sending discovery requests to hosts [10.0.0.211:0] on ports [7800 .. 7800]
and
DEBUG [org.jgroups.protocols.dns.DNS_PING] (jgroups-20,stage_keycloak_cluster-57943) stage_keycloak_cluster-57943: sending discovery requests to hosts [10.0.0.209:0] on ports [7800 .. 7800]
I’ve also tried do tweak kc.sh the same way as it was done here with docker-entrypoint.sh by adding BIND_OPTS=" -Djboss.bind.address=${THIS_IP} -Djboss.bind.address.private=${THIS_IP} " - but also without much luck.