英文:
How to revive a deleted pod?
问题
我使用命令 "kubectl delete pod --grace-period=0 --force --namespace" 强制删除了一个 pod,我期望该 pod 会重新生成,但它并没有,现在我甚至无法找到这个 pod 了。是否有一种方法可以重新生成一次已被删除的 Kubernetes pod,还是我需要用一个新的 pod 替换它?提前感谢!
英文:
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!
答案1
得分: 2
- 如果该 Pod 不属于任何部署或副本集等资源,几乎不可能恢复该 Pod。
- 如果您手动部署过它,那么您一定有一个 spec.yaml 文件,其中您定义了资源规格,或者如果您通过命令行部署,您必须在终端中有相应的历史记录。
- 如果您通过流水线或自动化方式部署,您知道该去哪里查找
英文:
- 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
答案2
得分: 0
- It seems that the
-a
flag has been removed fromkubectl 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.
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论