jgroups-extras / jgroups-kubernetes

JGroups discovery protocol for Kubernetes
http://jgroups.org
Apache License 2.0
90 stars 35 forks source link

Is this component necessary for application using jgroups deployed on Kubernetes? #13

Closed tjliupeng closed 6 years ago

tjliupeng commented 8 years ago

Hi,

At present we try to move our application which uses JGroups to manage the cluster to Kubernetes. The JGroups uses UDP to communicate. Than we find that on the k8s env, the nodes can not communicate to each other. Each node forms a group. Does this component solve this problem? Can we solve the problem using TCP?

slaskawi commented 8 years ago

Hey @tjliupeng !

Yes, that is correct.

TCP is a transport protocol but JGroups also need a discovery protocol to detect other nodes. KUBE_PING has been designed to solve discovery problem in OpenShift and Kubernetes.

Thanks Sebastian

tjliupeng commented 8 years ago

@slaskawi,

Any example to use this library for the application embedding Jgroups components?

Besides, our application also enables Jgroups TCPGossip.

Thanks

slaskawi commented 8 years ago

Infinispan provides KUBE_PING integration (https://github.com/infinispan/infinispan-simple-tutorials/tree/master/kubernetes). However you will probably be the most interested in configuration file, which can be found here: https://github.com/infinispan/infinispan/blob/master/cloud/src/main/resources/default-configs/default-jgroups-kubernetes.xml

Using Gossip Router in Kubernetes should also do the job. Take a look at this blog post for details: http://blog.infinispan.org/2015/03/infinispan-on-openshift-v3.html

tjliupeng commented 8 years ago

@slaskawi , Thanks. I will read them and get back here.

tjliupeng commented 8 years ago

@slaskawi , I succeuss to enable the TCP capability for Jgroups cluster in our application. Thanks for your help.

ramakrishna90 commented 6 years ago

in kubernetes version 1.8 it is giving 403 error when the kube_ping pings the kube api server. What can we do for this, we are using 0.9.3 version of the jgroups kubernetes discovery api, because the jgroups core api version is 3.6.11

slaskawi commented 6 years ago

I'm not sure exactly what the problem is but getting 403 usually means permission problems. You need to make sure that your Pod has view permissions. In OpenShift for example you need execute additional commands (see this manual entry). My intuition tells me that you will also need it for Kubernetes.

ramakrishna90 commented 6 years ago

Sorry everyone, I got the issue solved, We need to enable role binding in kubernetes where the service account for the namespace must be given the pod list get permissions

slaskawi commented 6 years ago

Great! I'm glad you solved the issue.. Closing.