How to list Kubernetes recently deleted pods?

后端 未结 8 878
隐瞒了意图╮
隐瞒了意图╮ 2020-12-14 14:35

Is there a way to get some details about Kubernetes pod that was deleted (stopped, replaced by new version).

I am investigating bug. I have logs with my pod name. Th

8条回答
  •  春和景丽
    2020-12-14 15:21

    There is a way to find out why pods were deleted and who deleted them. The only way to find out something is to set the ttl for k8s to be greater than the default 1h and search through the events:

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

提交回复
热议问题