bento icon indicating copy to clipboard operation
bento copied to clipboard

Kubernetes Events Input

Open hwinkel opened this issue 1 year ago • 5 comments

Is there a Input for kubernetes events?

hwinkel avatar Jul 19 '24 17:07 hwinkel

Hey! Thanks for raising this. Don't think there is functionality for watching for K8s events. However, there is an open PR for watching etcd events. Since K8s events are stored in etcd you could hypothetically use the etcd watcher to stream these events instead. Saw a SO answer for doing this with the etcdctl.

Curious, what is your use-case?

gregfurman avatar Jul 19 '24 17:07 gregfurman

Use Case: k8s API and Events Provides Data which are interesting for other IT systems, In particular we would like to have them published / integrated towards NATS

hwinkel avatar Jul 19 '24 19:07 hwinkel

I think that maybe when we get the etcd component in - we could look at writing a cookbook to provide this functionality?

jem-davies avatar Jul 20 '24 17:07 jem-davies

@hwinkel The new etcd input has been released. Haven't tested it with K8s though. Lemme know if you can use it to read kubernetes events!

gregfurman avatar Aug 21 '24 09:08 gregfurman

You can use the etcd connector to get kubernetes events although it's going to look something like this:

[{"create_revision":5293,"key":"/registry/pods/default/nginx-update-3-647677fc66-hpf67","lease":0,"mod_revision":5293,"type":"PUT","value":"...","version":1}]

Where the value will be protobuf encoded - struggling to find a schema to decode these - and perhaps it's just not the way to go anyway and we should create new components to connect to kubernetes directly ...

jem-davies avatar May 08 '25 17:05 jem-davies