Kubernetes: create events for custom resources Kubernetes: create events for custom resources kubernetes kubernetes

Kubernetes: create events for custom resources


You're looking for an operator. There are already a few pre-written ones out there, check OperatorHub. They are essentially controllers for custom resources, watching for events and acting on them.

You can also write your own, e.g. with the Operator SDK. When you write your own, you can update the status of the CR, depending on what your operator should do, which then shows up when calling kubectl describe.

A good start might be this post on Operators, and this here for listening to events from your custom resources.