Enroll filebeat in Kubernetes, monitor in Kibana when output is kafka possible?

I want to enroll filebeat running in a kubernetes cluster outputting to kafka.
In kibana it says to run that sudo filebeat enroll [API_KEY] command but since this is running kubernetes, it gets kinda tricky.

Is there a way to specify how to enroll the beat to centralized management via the yaml config?

Hi, thanks for reaching out about kubernetes and enrolling a beat. It's difficult today to enroll components in a kubernetes cluster since they're ephemeral.

Have you considered deploying beats as a DaemonSet? In the past, I've worked at places with large kubernetes clusters, and this approach worked well.

https://www.elastic.co/guide/en/beats/filebeat/master/running-on-kubernetes.html