Ingesting Kubernetes state events

The event messages we saw in the output of kubectl describe contain valuable information and complement the metrics gathered by kube-state-metrics. This allows us to determine exactly what happened to our pods or nodes. Consequently, those event messages should be part of our logging essentials, together with system and application logs. In order to achieve this, we'll need something to watch Kubernetes API servers and aggregate events into a logging sink. The event objects inside Kubernetes are also stored in etcd, but tapping into the storage to get those event objects might require a lot of work. Projects such as eventrouter (https://github.com/heptiolabs/eventrouter) can help in this scenario. Eventrouter works by translating event objects to structured messages and emitting them to its stdout. As a result, our logging system can treat those events as normal logs while keeping the metadata of events.

There are various other alternatives. One is Event Exporter (https://github.com/GoogleCloudPlatform/k8s-stackdriver/tree/master/event-exporter), although this only supports StackDriver, a monitoring solution on Google Cloud Platform. Another alternative is the eventer, part of Heapster. This supports Elasticsearch, InfluxDB, Riemann, and Google Cloud Logging as its sink. Eventer can also output to stdout directly if the logging system we're using is not supported. However, as Heapster was replaced by the metric server, the development of the eventer was also dropped.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset