Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Show pod status in Workloads / Pods view #201

Closed
alexbrand opened this issue Aug 21, 2019 · 5 comments · Fixed by #2675
Closed

Show pod status in Workloads / Pods view #201

alexbrand opened this issue Aug 21, 2019 · 5 comments · Fixed by #2675
Assignees
Labels
api enhancement New feature or request

Comments

@alexbrand
Copy link
Contributor

Kubectl seems to do some magic to show a "STATUS" of a given pod:

NAME                       READY   STATUS              RESTARTS   AGE
busybox-644dbf5f4b-2sjfs   1/1     Terminating         0          42m
busybox-644dbf5f4b-l5lzn   0/1     ContainerCreating   0          31m

I was somewhat surprised when I used Octant to look at the same set of pods. This is what Octant shows:

image

Notice how kubectl says the first pod is Terminating and the second is ContainerCreating, whereas Octant shows Running and Pending.

I understand that Octant is showing the pod's Phase and not the Status (I am actually not sure how kubectl computes this), but it was super confusing at first.

I am wondering if we should follow kubectl here and show Status instead of Phase, or perhaps add a new column that shows Status.

@wwitzel3 wwitzel3 added api enhancement New feature or request labels Aug 21, 2019
@wwitzel3
Copy link
Contributor

We are planning to refactor the way we do object status and this will be addressed at that time. Though it still may not map exactly to what you see in kubectl output, it will be improved to provide a better level of detail over just pending / running.

@wwitzel3
Copy link
Contributor

wwitzel3 commented Jul 19, 2021

Both status and phase should be displayed in Octant. Example YAML below of a Pod status / phase.

  containerStatuses:
  - image: quay.io/covalent/demo-elasticsearch:v1.2
    imageID: ""
    lastState: {}
    name: elasticsearch
    ready: false
    restartCount: 0
    started: false
    state:
      waiting:
        message: Back-off pulling image "quay.io/covalent/demo-elasticsearch:v1.2"
        reason: ImagePullBackOff
  hostIP: 10.128.15.203
  phase: Pending
  podIP: 10.48.7.15
  podIPs:
  - ip: 10.48.7.15
  qosClass: BestEffort
  startTime: "2021-07-14T17:49:16Z"

@ftovaro
Copy link
Contributor

ftovaro commented Jul 19, 2021

This one is pretty clear of what should be done, I'd like to take this one and work on it

@ftovaro
Copy link
Contributor

ftovaro commented Jul 23, 2021

I've been working on this one, the only problem I'm having is with the Terminated state.

When we are in a Pending phase like when we are creating a Pod, I can extract a Reason message from the Pod struct that says "ContainerCreating" as we need.

➜  ~ kubectl get all
NAME             READY   STATUS              RESTARTS   AGE
pod/client-pod   0/1     ContainerCreating   0          1s

But, when I get a Terminated state this is the output from kubectl get all:

➜  ~ kubectl get all
NAME             READY   STATUS        RESTARTS   AGE
pod/client-pod   0/1     Terminating   0          65s

And the Reason message from the Pod struct says Completed

image

Also, is visible in the image that with a Terminated state the phase is still on Running

This is the only inconsistency I'm having to finish the issue. Here is the draft PR #2675

@wwitzel3
Copy link
Contributor

@ftovaro and I met up, we are going to us pod.DeletionTimestamp != nil && lastStatus.State.Terminated == nil to infer the Terminating status.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants