-
Notifications
You must be signed in to change notification settings - Fork 756
Use existing Kafka cluster #196
Comments
Hi @solsson good to see you here, I have checked out your Yolean images of Kafka :) I am glad you agree with the use of Kafka. I think it is a matter of expertise and taste. To your issue, yes you can totally reuse an existing kafka cluster. The coupling is very lite. Currently when you install kubeless with the manifest we generate in the release https://github.com/kubeless/kubeless/releases/download/0.0.16/kubeless-0.0.16.yaml you will see that we launch a very simple kafka setup with single nodes statefulesets. The coupling happens in two locations:
Currently, events are only supported for the python runtime. We should be able to get to the Node.js within the next two weeks. So say you have an existing kafka cluster, if you could expose it within k8s as We should actually make that kafka endpoint a bit more generic to avoid hard-coding the dns name. |
Thanks for pointing out the built manifest. Without it the setup was a bit opaque to me. I hope to get time to test this as a branch from Yolean/kubernetes-kafka#30, now that I have vacation :) I haven't yet considered how/if we'll use Kubeless in production, but it'll be interesting to see where discussions in #186 and #148 are heading as we already have build infrastructure - and obviously events - in our clusters.
I think this mechanism can be in Kubeless independent of how Kafka is hosted. It too needs name+port to brokers. For example we used a simple java client at first, but more often these days we use the shell script in separate
I guess a service+endpoint could map to the actual service, for example Maybe the |
Would love to help you if you want to try this out, and any feedback would be very welcome. and definitely using your existing kafka configuration should not be a huge hurdle |
I'll be on vacation for two weeks. Will give this a shot after that. |
We've released kubernetes-kafka v2.0.0 now, and I just confirmed how easy it is to set up Kubeless on top of it. Summarized in Yolean/kubernetes-kafka#48. As you predicted @sebgoa the CLI's topic support fails with I suggest that you release a separate manifest, like you've done with openshift and rbac, for Kubeless with existing Kafka. I've only deleted from the release manifest, not edited anything. The I guess the service can also rely on a kind: Endpoints resource, for Kafka outside kubernets, so maybe it's best left to the user to define This assumes that the kafka setup will provide actual listener resolvable names through the service. |
@solsson great, thanks for trying this. If I recall correctly the cc/ @ngtuna see comment about creating a manifest with a kafka setup |
Tested with the label in Yolean/kubernetes-kafka@fe3a6b3, but still getting |
@ngtuna can you check this ? thx |
Took the time to investigate this myself now :) Yes it assumes kafka is in the |
@solsson sorry for a bit delay in response. So I just wrap up this:
So:
|
This means that there wont be a Adding a label to your kafka pods is a convenient way to qualify them for Kubeless. |
Even if there is a
Yeah. But for |
@ngtuna is this available in the latest release? |
@nikhita this one should be relatively easy to start with. You should run a kafka deployment outside kubeless...then figure out how to start kubeless to use that specific kafka. Verify that pubsub functions work. It should give you a smooth intro to running kubeless and using pubsub functions. |
hello, Best Practices Reserve port 9092 for INSIDE listeners. is there any config where i can change that ? |
Hello, Unfortunately it is not possible to configure Kafka in a different port and make it work with Kubeless yet. I am curious about why that port setup is a best practice, could you elaborate? |
because you want different security levels, |
Pretty sure we fixed this cc/ @andresmgot @ngtuna |
Not really, PubSub functions still expect Kafka in the |
No we have fixed this already. The pubsub func read |
I thought that the idea was to support an external Kafka system (so it doesn't even need to be in the same cluster). |
In the case of Kafka being on the same cluster, do we have documentation on how to use it? |
It is not. We need to document it. |
I have created #587 |
It is now possible to use the environment variable |
I'm a maintainer of https://github.com/Yolean/kubernetes-kafka, so naturally we have a cluster already :) Also https://github.com/kubernetes/charts/tree/master/incubator/kafka is quite widely adopted, judging by the number of pulls from https://hub.docker.com/r/solsson/kafka/.
I disagree with #32. Kafka is an excellent choice of events backend, with semantics that fit nicely with serverless function execution (can strive for exactly once). Also it makes it easy to integrate with other services in a streaming platform.
Can Kubeless use an existing Kafka cluster? You'd basically only need to specify any requirements on kafka config, and decouple kafka from the rest of Kubeless through a bootstrap brokers config. Maybe have some naming convention for topics.
The text was updated successfully, but these errors were encountered: