Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

NodePort for cp-zookeeper and cp-schema-registry #590

Open
swimand opened this issue Mar 14, 2022 · 3 comments
Open

NodePort for cp-zookeeper and cp-schema-registry #590

swimand opened this issue Mar 14, 2022 · 3 comments

Comments

@swimand
Copy link

swimand commented Mar 14, 2022

Currently it is possible to set cp-kafka to run with NodePort instead of ClusterIP, but there is no way to do the same for the zookeeper and schema registry services.

Is there a workaround which would allow me to expose these services to the localhost? Or would it be possible to add such a feature?

@imalik8088
Copy link

For SR and ZK you can write your own Service resources with NodePort or any other required types. I wouldn't suggest to open ZK to access it from outside if you have not reasons to make ZK accessible from from outside.

@swimand
Copy link
Author

swimand commented Mar 28, 2022

This is only for local development purposes, where I am running my application directly in the IDE, and would like to connect to the cp-helm-charts that are running on my local machines kubernetes cluster.

As I would prefer to keep the same port configuration, I have been attempting this suggested solution with services of type LoadBalancer with same port as targetport.
Sadly it doesn't seem to be working. Although the ports are exposed and the kafka/schema-registry/zookeeper seem to be reachable, they aren't accepting the connection from my application (Java/Spring).
Am I missing any specific settings to allow connections from outside the kubernetes cluster?

@OneCricketeer
Copy link

missing any specific settings to allow connections from outside the kubernetes cluster

Does this help? https://strimzi.io/blog/2019/04/17/accessing-kafka-part-1/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants