JBOSS/Wildfly clustering and Kubernetes -
There are few way to achieve your goals:
1 use kubernetes DNS addresses instead of IP addresses as K.Nicholas wrote.
2 use Calico CNI plugin and use annotations :
annotations: cni.projectcalico.org/ipAddrs: "[\"192.168.0.1\"]"
for specifying IP address for your pods.Information on how to configure Calico in your cluster can be found in documentation.
By the way, it isn't a good practice to use sticky IP address.