Sub topic 13
Why events disappear: retention and deduplication
This chapter assumes you can run kubectl describe and read the Events section, and that you know what a Pod, a Deployment and a Node are. Events are useful for debugging, but they are not a permanent record. You need to know when they are gone and when they are merged.
Events are short-lived objects
An event is an ordinary API object stored in etcd, the cluster's key-value store. The API server deletes each event after a time-to-live (TTL). The default TTL is one hour. It is set with the --event-ttl flag on kube-apiserver. On managed clusters you usually cannot change it.
The TTL has two consequences:
- A Pod that failed yesterday has no events left.
kubectl describeshowsEvents: <none>, even though the problem is real. - A Pod that has run for days may show no scheduling or image-pull events. Those happened at start-up and have already expired.
Status does not expire this way. Phase, container states and conditions live in the object itself, so they last as long as the object does. When events are gone, fall back to status, kubectl logs --previous, and any logs stored outside the cluster.
Deduplication: repeated events become one
A failing Pod can produce the same event every few seconds. The event recorder in each component (the kubelet, the scheduler, controllers) merges identical events instead of creating new objects. Each merge updates the existing event:
apiVersion: v1
kind: Event
type: Warning
reason: BackOff
message: Back-off restarting failed container app in pod web-0
involvedObject:
kind: Pod
name: web-0
namespace: default
count: 14
firstTimestamp: "2026-12-05T06:50:12Z"
lastTimestamp: "2026-12-05T07:10:44Z"count rises, and lastTimestamp moves forward. kubectl describe shows this as an age such as 3m (x14 over 20m). It means the event happened 14 times, and the latest one was 3 minutes ago.
Two things follow from this:
- A high count means a problem is continuing, not that it happened once. Compare
lastTimestampwith the current time. - Because the same object is updated, its TTL restarts with each update. A persistent failure can stay visible longer than one hour.
The newer events.k8s.io/v1 API stores this in a series field (count and lastObservedTime) instead. kubectl events reads both forms.
Similar events and rate limiting
The recorder also merges events that differ only in their message. If about ten similar events arrive for the same object within ten minutes, they are collapsed into one event whose message ends in (combined from similar events). You then lose the individual messages.
The recorder also applies a rate limit per source and object. The default is a burst of 25 events, refilled at one event every five minutes. A noisy object can have events dropped without any sign.
Keeping events you need
Events are best-effort. Do not build alerts or audits that assume every event is delivered. To keep them:
- Watch them while you reproduce a problem, and save the output.
- Run an event exporter in the cluster that sends events to your logging system.
- Alert on metrics and status conditions, which are more reliable than events.
kubectl get events -A --watch | tee events.logExercise
A Pod has been crash-looping for three hours. kubectl describe shows one BackOff event with "x212 over 3h". Why is the event still there after the one-hour TTL, and why does it show only one line?
Show answer
The recorder merges identical events into one object and updates its count and last timestamp on each repeat. Each update restarts the TTL, so the event stays while the failure continues. The earlier events (scheduling, image pull) were separate objects and have expired.