Skip to main content

Command Palette

Search for a command to run...

Kubernetes Preemption Event

Updated
1 min read
Kubernetes Preemption Event
K

I like learning new stuff - anything, including technology. I love tinkering with new tools, systems and services, especially open source projects

You can look for Kubernetes Preemption Events in your observability system assuming you are exporting your Kubernetes Events to some store like some time series DB or similar

In our case, we use Prometheus and we have an exporter for exporting the Kubernetes Events

With this, we are able to find all the preemption events using the PromQL

kube_event_exporter{reason="Preempted"}

If you look for this data for a long period - say 1 day, 1 week etc, you will notice any of the events that have happened. You can explore this data in Prometheus or use Grafana - and execute it as Range query over a period of time, instead of an Instant query

This event data also has fields like source which tells the scheduler’s name. For example, it could have a value like /default-scheduler

Preemption events help you understand which high priority pods are kicking out which low priority pods :)