Red HatFrancisco De Melo Junior, Alexander Barbosa AyalaTutorial
JBoss EAP clustering in OpenShift: KUBE_PING discovery
Summary
This article explores the JGroups KUBE_PING discovery protocol for clustering JBoss EAP 7 and JBoss EAP 8 in Red Hat OpenShift 4. KUBE_PING queries the Kubernetes API directly for pod IP addresses, then filters them by namespace and labels to establish peer-to-peer TCP connections. Configuring KUBE_PING requires setting three environment variables: JGROUPS_PING_PROTOCOL, KUBERNETES_NAMESPACE, and KUBERNETES_LABELS. The default service account must be granted the view role on the namespace to avoid HTTP 403 errors. In JBoss EAP 8, clustering is not enabled by default and must be provisioned via Galleon layers during the build process.
Context
This article is part 2 of a series on clustering JBoss EAP 7 and JBoss EAP 8 in Red Hat OpenShift 4. It focuses on the KUBE_PING discovery protocol, which queries the Kubernetes API directly for pod IP addresses, as an alternative to DNS_PING covered in part 1.
Approach / What changed
Configure the JGroups KUBE_PING protocol by setting three environment variables (JGROUPS_PING_PROTOCOL to kubernetes.KUBE_PING, KUBERNETES_NAMESPACE, and KUBERNETES_LABELS) and granting the default service account the view role on the namespace. For JBoss EAP 8, the clustering layer must be provisioned via Galleon during the build.
Takeaways
KUBE_PING queries the Kubernetes API directly for pod IP addresses, then filters by namespace and labels to establish TCP connections.
Configuring KUBE_PING requires three environment variables: JGROUPS_PING_PROTOCOL, KUBERNETES_NAMESPACE, and KUBERNETES_LABELS.
The default service account must be granted the view role on the namespace to avoid HTTP 403 permission errors.
FAQ
What is the difference between KUBE_PING and DNS_PING?
KUBE_PING queries the Kubernetes API server for pod IP addresses, whereas DNS_PING resolves pod IP addresses directly through DNS.
Why does KUBE_PING require namespace details?
The protocol queries pod IP addresses across the cluster, then uses the namespace and labels to filter which pods receive ping and join requests.
What is required to configure KUBE_PING in JBoss EAP 7 or 8?
Configuring kubernetes.KUBE_PING requires service account permissions and 3 environment variables: JGROUPS_PING_PROTOCOL, KUBERNETES_NAMESPACE, and KUBERNETES_LABELS.
Source and freshness
- Source
- developers.redhat.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.