Re: [kubernetes/kubernetes] kubectl get pods should report last restart time? (#54491)

8 views
Skip to first unread message

grodrigues3

unread,
Oct 25, 2017, 2:27:27 PM10/25/17
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

@kubernetes/sig-cli-feature-requests


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

zhengjiajin

unread,
Oct 25, 2017, 10:50:48 PM10/25/17
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

i thank we can add a column LASTSTARTED. alse it should be close to RESTARTS column

zhengjiajin

unread,
Oct 25, 2017, 10:51:53 PM10/25/17
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

/assign

Stewart-YU

unread,
Oct 26, 2017, 1:14:47 AM10/26/17
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

I think add a column LASTSTARTED need, keeping RESTARTS column also need. LASTSTARTED reflect short-term pod's status, RESTARTS reflect long-term pod's status recently. @zjj2wry

zhengjiajin

unread,
Oct 27, 2017, 5:45:07 AM10/27/17
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

when my pod do not have lastState:(my pod not running all the time). should the column show?

David Oppenheimer

unread,
Oct 28, 2017, 6:55:10 PM10/28/17
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

I have a REALLY dumb question. What causes a pod to restart? (As opposed to being deleted.)

VictorBHub

unread,
Jan 29, 2018, 4:34:04 AM1/29/18
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

@zjj2wry 'lastState:' contains info about the start and end of the last dead pod.
the original suggestion, I think, was to show the current pod ready since time (the 'lastTransitionTime' under status.conditions on the element where "type": "Ready")

fejta-bot

unread,
Apr 29, 2018, 5:41:47 AM4/29/18
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

Eric Sniff

unread,
May 26, 2018, 4:11:39 PM5/26/18
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

@davidopp in our stack the main causes are OOMs and segfaults.

fejta-bot

unread,
Jun 25, 2018, 4:13:58 PM6/25/18
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.

/lifecycle rotten
/remove-lifecycle stale

fejta-bot

unread,
Jul 25, 2018, 5:01:07 PM7/25/18
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.


Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

k8s-ci-robot

unread,
Jul 25, 2018, 5:01:12 PM7/25/18
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

Closed #54491.

etibroo

unread,
Jan 4, 2019, 8:58:53 AM1/4/19
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

/assign

What happened after this? Is there a plan to include this?

HerrTamm

unread,
Dec 11, 2019, 2:17:20 AM12/11/19
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

Also interested in the smae feature, it especially helps to debug services in general namespaces (e.g. kube-system), where multiple services and a lot of pods are running.


You are receiving this because you are on a team that was mentioned.

Reply to this email directly, view it on GitHub, or unsubscribe.

rohitkhatana

unread,
Dec 26, 2019, 9:08:13 PM12/26/19
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

This feature should be there. It helps in identifying issue in much better/easy way. For example if we are facing issues during in a time window, in the that time window it is very relevant information to see.

antoniocascais

unread,
Jan 15, 2020, 6:35:59 AM1/15/20
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

Totally agree with @rohitkhatana !

Pieter

unread,
Feb 12, 2020, 3:26:22 PM2/12/20
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

I have a REALLY dumb question. What causes a pod to restart? (In-place on the same node. As opposed to being deleted.)

I think the container exiting on it's own, e.g. app detecting a missing value at startup or faulty db connection and then electing to exit.

Maciej Szulik

unread,
May 26, 2020, 3:44:31 AM5/26/20
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

/reopen
/lifecycle frozen

Maciej Szulik

unread,
May 26, 2020, 3:44:43 AM5/26/20
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

/assign

Kubernetes Prow Robot

unread,
May 26, 2020, 3:44:45 AM5/26/20
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

@soltysh: Reopened this issue.

In response to this:

/reopen
/lifecycle frozen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Kubernetes Prow Robot

unread,
May 26, 2020, 3:44:45 AM5/26/20
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

Reopened #54491.

desertfury

unread,
Jun 17, 2020, 4:57:18 PM6/17/20
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

/assign

Maciej Szulik

unread,
Mar 1, 2021, 7:50:57 AM3/1/21
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

For anyone willing to work on this, the last restart time should be an approximation from all the statuses of all containers and initcontainers. I will want to see extensive unit tests for this particular case.

Jordan Jacobelli

unread,
Mar 1, 2021, 6:11:09 PM3/1/21
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

Hey, I would like to work on this if possible. That would be my first contribution to Kubernetes so I may need help at some point

Maciej Szulik

unread,
Mar 2, 2021, 7:33:48 AM3/2/21
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

@Ethyling go ahead, feel free to ping me on slack, but it might take a bit for me to reply 😉 due to upcoming code freeze for 1.21.

Jordan Jacobelli

unread,
Mar 2, 2021, 1:03:04 PM3/2/21
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

@Ethyling go ahead, feel free to ping me on slack, but it might take a bit for me to reply wink due to upcoming code freeze for 1.21.

Hey @soltysh , thank you!

I currently have a first version:

$ kubectl get pods
NAME                                READY   STATUS                  RESTARTS   LAST RESTART   AGE
nginx-deployment-66b6c48dd5-sb297   1/1     Running                 1          9m30s          12m
nginx-deployment-79fbfbd7c8-hj8z5   0/1     Init:CrashLoopBackOff   5          54s            4m40s

I'm using the LastTerminationState attribute of the container status. I don't know if it's the right attribute to use. I will clean my code and open a PR. I think it will be easier to discuss

Jordan Jacobelli

unread,
Mar 12, 2021, 8:11:20 AM3/12/21
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

Hey @soltysh, I opened the PR, if you have some time to check it

Kubernetes Prow Robot

unread,
Jun 2, 2021, 1:55:03 PM6/2/21
to kubernetes/kubernetes, k8s-mirror-cli-feature-requests, Team mention

Closed #54491 via #100142.

Reply all
Reply to author
Forward
0 new messages