Logs from filebeat not being written to kafka topic

Hi,
I have filebeat application deployed on ec2 instance. I'm trying to connect to kafka that is deployed on EKS cluster.
When I'm trying to connect to kafka, the connection gets established but nothing is being written on kafka topic.
There are no errors in filebeat or kafka.
Since kafka is inside cluster and I'm trying to access it from outside, I have created a URL and mapped it to kafka.