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

Feature Request: List all containers (if --containers flag given) #52

Open
Dentrax opened this issue May 25, 2022 · 1 comment
Open

Comments

@Dentrax
Copy link

Dentrax commented May 25, 2022

It would be great to list all containers for each Pod if --containers flag passed. Couldn't find a similar issue, so dropping this idea.

$ kubectl tree deployment foo

NAMESPACE  NAME                          READY  REASON  AGE
aa         Deployment/foo                -              21h
aa         └─ReplicaSet/foo-6f67dcc579   -              10m
aa           └─Pod/foo-6f67dcc579-znb55  True           10m

But we probably have to include a new column called RUNNING if aforementioned flag passed. (Not so sure about this) Like the following:

$ kubectl tree deployment foo --containers

NAMESPACE  NAME                              READY  RUNNING  REASON  AGE
aa         Deployment/foo                    -      -                21h
aa         └─ReplicaSet/foo-6f67dcc579       -      -                10m
aa           └─Pod/foo-6f67dcc579-znb55      True   -                10m
aa             └─Container/first-container   -      True
aa             └─Container/second-container  -      True

I've tried to pass pods into KIND to check whether it works:

$ kubectl tree pods foo-6f67dcc579-znb55
Error: ambiguous kind "pods". use one of these as the KIND disambiguate: [pods.v1., pods.v1beta1.metrics.k8s.io]

$ kubectl tree pods.v1 foo-6f67dcc579-znb55
Error: could not find api kind "pods.v1"

$ k api-resources | grep "pod"
pods                           po        v1                      true         Pod

But no luck. So decided to file an issue for further discussing. Thoughts?

cc @anilmisirlioglu @Abdulsametileri

@ahmetb
Copy link
Owner

ahmetb commented May 25, 2022

Are containers api objects? I don’t think so. So that might be why they do not show up. This tool works on objects in a generic way. This request might be more appropriate for a contextual plugin like “lineage”.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants