How to list Kubernetes recently deleted pods?

后端 未结 8 907
隐瞒了意图╮
隐瞒了意图╮ 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:34

    If you want to see all the previously deleted pods and you are trying to fetch the previous pods.

    Command line: kubectl get pods

    in which you will get all the pod details, because every service has one or more pods and they have unique ip address

    Here you can check the lifecycle of pods and what phases of pod has. https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle

    and you can see the previous pod logs by typing a command: kubectl logs --previous

提交回复
热议问题