pravega / zookeeper-operator

Kubernetes Operator for Zookeeper
Apache License 2.0
367 stars 202 forks source link

Zk clientservice cannot be declared external #572

Open Ella-eln opened 1 year ago

Ella-eln commented 1 year ago

The operator creates 3 services: adminServerService, clientservice and headless. Out of which, only adminServerService could be declared as external (available outside of the cluster via nodeport). This creates a problem when deploying an app that uses the zk as state manager because other apps may require access to that state.

For example, Solr using the operator, zk operator is used to create a quorum that keeps tab on Solr's nodes. In order to write data to Solr one must contact the quorum (done through client port) and obtain a list of available nodes. Without this ability, Solr is practically unavailable.

This problem could be solved relatively simply by adding the option to make clientservice external to the operator

yortch commented 12 months ago

I also have a similar use case to be able to access zookeeper as a stand alone component and connect to it from outside the Kubernetes cluster. I created a NodePort service (for port 2181) and was able to access it and connect to it using zkCli. My only question is as to whether the leader election port (3888) and quorum port (2888) need to be exposed as well?