Hi Anish,

You need to exec into the kafka client containers to be able to produce and consume messages using the command line tools that Kafka provides out of the box. To exec into the kafka-client container named kafkaclient-1 you can execute

kubectl exec -it kafkaclient-1 sh

This will open a shell for you inside the running kafka client container on kubernetes and now you can test your setup.

Keep in mind this is just for testing. In a more real-world scenario your kafka clients would probably be a end user application ( like a Spring Boot App ) that would access the Kafka clusters running on kafka. Here in interest of time, I have used the OOTB provided console consumers & producers provided by Kafka to simulate sending and receiving of messages.

Hope this helps.

Engineering @ Atlassian | Ex-Adobe | Ex-Microsoft | https://agrajmangal.in/blog/ | Opinions my own

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store