I force deleted a pod using the command "kubectl delete pod --grace-period=0 --force --namespace " I expected the pod to regenerate itself but it has not and now I cannot even locate the pod anymore. Is there a way to regenerate a kubernetes pod that has once been deleted or do I need to replace it with a new pod? Thanks in advance!
Asked
Active
Viewed 89 times
-1
-
Hey, so they removed that feature... https://stackoverflow.com/questions/40636021/how-to-list-kubernetes-recently-deleted-pods – Menachem Hornbacher Jun 06 '23 at 02:48
2 Answers
2
- If the pod is not under any deployment or replica set any such resources, it is almost impossible to retrieve the pod back.
- If you have deployed it manually, you must have had a spec.yaml file where you would have defined the resource spec or if you have deployed via command line, you must have the history in terminal.
- If you have deployed via pipeline or automation, you know where to search :)

Nehal Ram
- 21
- 2
0
It seems that the -a
flag has been removed from kubectl pods get
This answer has some interesting options
You can probably find it by name but cannot just "bring it back". It would need to be replaced.

Menachem Hornbacher
- 2,080
- 2
- 24
- 36