简体   繁体   English

Kubernetes kubectl - 列出最新推出的 pod

[英]Kubernetes kubectl - List pods of latest rollout

Question related to get one of new pod name after kubectl rollout status |在 kubectl 推出状态后获取新 pod 名称之一相关的问题 | kubectl get pods --field-selector returns Terminating pods kubectl get pods --field-selector 返回终止 pods

In this question I've asked about how to filter out terminated pods from list of all pods of deployment - which is still valid - but I've realised that maybe I've asked wrong questions and it should be:在这个问题中,我询问了如何从所有部署 pod 列表中过滤掉终止的 pod - 这仍然有效 - 但我意识到也许我问了错误的问题,它应该是:

How to list pods of latest rollout of deployment using kubectl?如何使用 kubectl 列出最新部署的 pod? (Or list pods of particular rollout given by rollout number? If there would be unified way to achieve both) (或者列出推出编号给出的特定推出的吊舱?如果有统一的方法来实现两者)

This might not be relevant but at work we use grafana and it captures events in our kubernetes clusters.这可能无关紧要,但在工作中我们使用 grafana,它会捕获 kubernetes 集群中的事件。 Those events can be filtered by deployment id so it's easy to see what pods have been deployed and their new state.这些事件可以通过部署 ID 过滤,因此很容易查看已部署的 pod 及其新的 state。 Perhaps there are kubectl commands to view events and filter them in a particular way?也许有 kubectl 命令可以查看事件并以特定方式过滤它们?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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