Augusto WYZ
Augusto WYZ

Reputation: 21

Is possible for a container to send kafka event when finishes?

We just migrated to a kubernetes cluster, I was wondering if it is possible to send a kafka event when a container/pod finishes automatically with the stdout as message. Right now we are using fluentd with elastic search but the output of a pod is used as input for the next one, we need to poll constantly elastic search for when the output is ready and that causes performance issues on overall execution

Upvotes: 2

Views: 487

Answers (1)

clarj
clarj

Reputation: 1044

I'm not sure of your current setup but my first thought would jump to:

  • Use something such as fluentd or Logstash on it's own pod per node
  • Configure volume access to Kubernetes log folder /var/log/containers/*
  • Use the Kafka output for either fluentd or Logstash with file input (tail) on the logging folder

This approach would require the configuration above on each node however but requires minimal configuration of logging locations etc..

It's not something I've personally configured but have considered it for the future.

More info here

Upvotes: 1

Related Questions