这是请求帮助吗? (如果是,您应该使用我们的故障排除指南和社区支持渠道,请参阅 http://kubernetes.io/docs/troubleshooting/。):否
在提交这个问题之前,您在 Kubernetes 问题中搜索了哪些关键字? (如果您发现任何重复项,您应该在那里回复。):搜索这个有点困难,因为它包含很多关键字。
这是错误报告还是功能请求? (选择一项):问题
标题说的差不多。 我之所以这么问是因为有时我想彻底杀死一个 pod,但我不记得我曾经用什么来创建它。
@jason-riddle 我想你可以检查 pod 的 created-by 注释。
@AdoHe但那是假设它是我没有做的第一个设置。 但是,您的建议导致以下情况。
通过 describe 调用,您只需 grep 即可获取Controllers
。
kubectl describe pods dd-agent-4qwo1 | grep Controllers
# Controllers: DaemonSet/dd-agent
在单独运行 Pod 的情况下, Controllers
将为空。
kubectl describe pods apache | grep Controllers
# Controllers: <none>
谢谢!
为我工作:
kubectl
描述pod <Podname> -n <namespace> | grep "Controlled By"
最有用的评论
@AdoHe但那是假设它是我没有做的第一个设置。 但是,您的建议导致以下情况。
通过 describe 调用,您只需 grep 即可获取
Controllers
。在单独运行 Pod 的情况下,
Controllers
将为空。谢谢!