-1

Question related to get one of new pod name after kubectl rollout status | kubectl get pods --field-selector returns Terminating 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:

How to list pods of latest rollout of deployment using kubectl? (Or list pods of particular rollout given by rollout number? If there would be unified way to achieve both)

stopsopa
  • 408
  • 4
  • 20

1 Answers1

1

This might not be relevant but at work we use grafana and it captures events in our kubernetes clusters. Those events can be filtered by deployment id so it's easy to see what pods have been deployed and their new state. Perhaps there are kubectl commands to view events and filter them in a particular way?

Leslie Alldridge
  • 1,427
  • 1
  • 10
  • 26
  • It might be useful but that would be solution quite long way around. I'm actually disappointed recently that finding solutions for such a simple tasks with kubectl very often becomes a rabbit hole. – stopsopa Mar 21 '21 at 01:21
  • I agree with **Leslie Alldridge**. In my opinion the best (and easiest) way is to have your logs/events centralized. – matt_j Mar 22 '21 at 16:34