Pcornel
Observability · Events

Kubernetes Events

Cheat sheet · https://pcornel.dk/topic.php?topic=6212

Back to the Topic

Answer

Kubernetes events record cluster activity — scheduling, image pulls, probe failures, OOM kills, scaling — and expire after about an hour by default.

Remember

Events are short-lived: export them (event exporter, Collector k8sobjects receiver) to keep history. Warnings are the interesting ones.

First checks

  • kubectl get events -A --field-selector type=Warning --sort-by=.lastTimestamp — first check for this topic
  • curl -s localhost:9090/-/ready — Prometheus ready
  • curl -s 'localhost:9090/api/v1/query?query=up' — scrape targets up/down
  • promtool check config prometheus.yml — config valid

Verify in this order

controller action → Event object → kubectl/exporter → log platform

Where it usually breaks

Events disappear before someone reads them.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6212

Confirmation

Confirm action

Continue?