Kubernetes: 【问题】如何知道pod属于什么(Rep.Controller、Deployment、Replica Set等?)

创建于 2016-09-05  ·  3评论  ·  资料来源: kubernetes/kubernetes

这是请求帮助吗? (如果是,您应该使用我们的故障排除指南和社区支持渠道,请参阅 http://kubernetes.io/docs/troubleshooting/。):否

在提交这个问题之前,您在 Kubernetes 问题中搜索了哪些关键字? (如果您发现任何重复项,您应该在那里回复。):搜索这个有点困难,因为它包含很多关键字。


这是错误报告还是功能请求? (选择一项):问题

标题说的差不多。 我之所以这么问是因为有时我想彻底杀死一个 pod,但我不记得我曾经用什么来创建它。

arekubectl

最有用的评论

@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>

谢谢!

所有3条评论

@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"

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

rhohubbuild picture rhohubbuild  ·  3评论

montanaflynn picture montanaflynn  ·  3评论

errordeveloper picture errordeveloper  ·  3评论

tbchj picture tbchj  ·  3评论

theothermike picture theothermike  ·  3评论