How to list Kubernetes recently deleted pods?

As of today, kubectl get pods -a is deprecated, and as a result you cannot get deleted pods.

What you can do though, is to get a list of recently deleted pod names – up to 1 hour in the past unless you changed the ttl for kubernetes events – by running:

kubectl get event -o custom-columns=NAME:.metadata.name | cut -d "." -f1

You can then investigate further issues within your logging pipeline if you have one in place.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)