Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubectl get pods says REASON, but reason for what? #10560

Closed
erictune opened this issue Jun 30, 2015 · 6 comments
Closed

kubectl get pods says REASON, but reason for what? #10560

erictune opened this issue Jun 30, 2015 · 6 comments
Labels
area/kubectl priority/backlog Higher priority than priority/awaiting-more-evidence. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.
Milestone

Comments

@erictune
Copy link
Member

Example output from my cluster:

$ kubectl get pods
NAME                      READY     REASON                                  RESTARTS   AGE
cpuhog                    0/1       ExitCode:127                            0          1h
frontend                  0/2       Pending                                 0          1h
frontend2                 0/1       Running                                 12         48m
frontend3                 0/1       Running                                 11         39m
frontend4                 0/1       Pending                                 0          18m
frontendbig               0/2       Pending                                 0          16s
kube-dns-v3-hzdfg         3/3       Running                                 2          3d
memhog                    0/1       OOM Killed                              0          5m
private-image-test-2      0/1       Running                                 12         3d
private-image-test-3      0/1       Error: image foo/private:v1 not found   0          3d

What is the REASON column a reason for?
It looks like it is the reason for being terminated if terminated, otherwise it is showing status.phase, except when status.phase == "Failed", in which case it shows one of the .status.containerStatuses[].state.terminated.reason.

I think it would be clearer to show phase and then reason, so that it is clear that the reason about why it is in that phase.

For example:

$ kubectl get pods
NAME                      READY     PHASE    REASON                                  RESTARTS   AGE
cpuhog                    0/1       Failed   ExitCode:127                            0          1h
frontend                  0/2       Pending                                          0          1h
frontend2                 0/1       Running                                          12         48m
frontend3                 0/1       Running                                          11         39m
frontend4                 0/1       Pending                                          0          18m
frontendbig               0/2       Pending                                          0          16s
kube-dns-v3-hzdfg         3/3       Running                                          2          3d
memhog                    0/1       Failed   OOM Killed                              0          5m
private-image-test-2      0/1       Running                                          12         3d
private-image-test-3      0/1       Pending  Error: image foo/private:v1 not found   0          3d

I get that we are trying to save screen width. It costs 8 columns to separate Phase.
We could recover 3 columns by narrowing the READY column
and another 3 by renaming "RESTARTS" to "TRIES".

@erictune erictune added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. area/kubectl priority/backlog Higher priority than priority/awaiting-more-evidence. labels Jun 30, 2015
@bgrant0607
Copy link
Member

cc @andronat @ghodss

@andronat
Copy link
Contributor

The way I see it is that REASON explains why READY is not n/n and it is something like 0/n or 1/n. Maybe we should discard Running from REASON?

@ghodss
Copy link
Contributor

ghodss commented Jun 30, 2015

What if we keep the current behavior but rename REASON to STATUS? It seems like that would be a close enough approximation without adding width.

@erictune
Copy link
Member Author

erictune commented Jul 1, 2015

I like @ghodss suggestion.

@bgrant0607
Copy link
Member

I'm fine with STATUS. It basically needs to be done today, though.

@bgrant0607 bgrant0607 added this to the v1.0 milestone Jul 1, 2015
@andronat
Copy link
Contributor

andronat commented Jul 1, 2015

I am on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubectl priority/backlog Higher priority than priority/awaiting-more-evidence. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.
Projects
None yet
Development

No branches or pull requests

4 participants