Pcornel
Browse topics
Options
Recent
Favorites
Observability · Technical reference

Kubernetes Events

Direct answer

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

When to use this

Use it when pods fail or the cluster behaves unexpectedly.

First 30 seconds

1. Recent warnings: kubectl get events -A --field-selector type=Warning --sort-by=.lastTimestamp.

2. Per object: kubectl describe pod <pod>.

3. Reasons: FailedScheduling, BackOff, Unhealthy, OOMKilling.

4. Events exported?

5. Correlate with metrics.

Operational verification

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

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
OpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformOpenTelemetry / Prometheus / Grafana / common metrics-log-trace pipelines
Scope / prerequisiteUse it when pods fail or the cluster behaves unexpectedly.
What next?2 suggested next steps
Evidence0
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 How to verify Verify boundary

During an incident, read Warning events first. After the incident, confirm the exported events cover the period.

Step 2 Common failures Narrow the fault

Events disappear before someone reads them. Large clusters produce many events and load the API server if retention is long. Relying only on events misses application-level errors.

Key points

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

Key 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
ReferenceWhat it is1 section · depth on demand

How it works

Components create Event objects referencing the involved object, with reason, message, count and timestamps. Repeated events are counted instead of duplicated.

ReferenceImportant terms & boundaries3 sections · depth on demand

Using events

kubectl get events -A --sort-by=.lastTimestamp
kubectl get events --field-selector type=Warning -n app
kubectl describe pod <pod>         # events at the bottom

Events expire after one hour by default, so export them (kubernetes-event-exporter, OpenTelemetry k8sobjects receiver) to keep history. Common warnings: FailedScheduling, BackOff, Unhealthy, FailedMount, Evicted.

In depth

What events are — and are not

Events are short-lived, best-effort records written by controllers, the scheduler and kubelets. The API server keeps them for a limited time (--event-ttl, one hour by default), repeated events are deduplicated into one object with a count, and reasons and messages can change between versions. They are excellent hints during an incident and a poor audit log.

Reading events efficiently

kubectl get events -A --field-selector type=Warning --sort-by=.lastTimestamp | tail -20
kubectl get events -n shop --field-selector involvedObject.kind=Pod,involvedObject.name=api-7f…
kubectl events -n shop --for pod/api-7f… --watch          # kubectl 1.26+

Reasons worth recognising

ReasonSourceMeaning
FailedSchedulingschedulerNo node fits — message lists why per node count
FailedMount, FailedAttachVolumekubelet / attach controllerVolume problem
BackOffkubeletContainer restarting (CrashLoopBackOff) or image pull back-off
UnhealthykubeletProbe failed
OOMKilling / Evictedkernel monitor / kubeletMemory kill or node-pressure eviction
FailedCreateReplicaSet/Job controllerPod rejected (quota, admission policy, security)
NodeNotReadynode controllerNode lost

Keeping them

To see events after an incident, export them: an event exporter (or the OpenTelemetry Collector's k8sobjects/k8s_events receiver) writes each event as a log line to the log platform, where it can be searched with the deployment markers and application logs for the same period. Keep the exporter's own volume in check by dropping Normal events you never use.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Common mistakes

  • Kubernetes events retained only for a short time (export them).
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
kubernetes eventskubernetes eventsevent exporter
Confirmation

Confirm action

Continue?