Skip to content

jgroups-extras/jgroups-kubernetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes discovery protocol for JGroups

This repository contains Kubernetes Ping protocol for JGroups. The protocol can also be used in OpenShift v3 environment (which is also based on Kubernetes).

This is the stable branch that will work for both JGroups 3 and 4. We are working on a new version (in master branch) which will contain a lot of improvements for JGroups 4. Stay tuned…​

How to use it

In order to run JGroups discovery on Kubernetes one needs to add necessary dependencies to the project:

Maven dependencies
<dependency>
    <groupId>org.jgroups.kubernetes</groupId>
    <artifactId>kubernetes</artifactId>
    <version>${version.kubernetes-ping}</version>
</dependency>

It is highly recommended to use JGroups version which is transitively pulled by the Kubernetes discovery protocol (however it is not strictly required).

When deploying on OpenShift v3, the next step requires adding additional privileges using the following command:

Adding additional privileges
oc policy add-role-to-user view system:serviceaccount:$(oc project -q):default -n $(oc project -q)

Thant’s it!

Additional configuration options

Environmental variables

The configuration is mainly done using environmental variables:

Variable name

Meaning

Default

Example

OPENSHIFT_KUBE_PING_NAMESPACE

Namespace used for discovery

<not set>

Cluster-1

OPENSHIFT_KUBE_PING_LABELS

Labels used for discovery

default

my-cluster

OPENSHIFT_KUBE_PING_SERVER_PORT

Port used for hosting internal server

8888

my-cluster

About

JGroups discovery protocol for Kubernetes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 18

Languages