简体   繁体   中英

Anyway to reload the deleted pods from kubernetics cluster

I want to reload the deleted pods from the Kubernetes cluster . Is that possible?.

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

There is the option -p if with you want to check the logs from terminated pods.

-p, --previous=false: If true, print the logs for the previous instance of the container in a pod if it exists.

kubectl logs -p terminated-pod-name

The pod itself is ephemeral as well as its information unless you keep them with a persistent volume you are not able to recover such information once the pod is terminated/deleted. If you need to debug the pod you can use the describe.

kubectl describe pod pod-name

If you have a deployment object, you may fetch the last deployed versions or may rollback to previous versions based on the revision history value set in the deployment object.

As explained by @Bartosz Bilicki here How to list Kubernetes recently deleted pods? you can also fetch the data from the events.

I hope it helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM