-
Notifications
You must be signed in to change notification settings - Fork 923
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 all does not list all resources in a namespace #151
Comments
|
@stewart-yu: Double dash and short form ( Both variants below do work: You can look that up in
|
/kind bug |
I will fix it ASAP |
cc @smarterclayton Described as above. We can not get |
There are some rules about which resources must fall under "all", take a look here. Are the resources you want covered there? |
@fabianofranz: Yes, limits are covered there (Rule 2: No namespace admin level resources (limits, quota, policy, authorization rules)). This leaves me frustrated though:
|
There's an open issue for that - I'd like to see it solved, but it requires
some other work to happen because there are resources that exist, but
aren't deletable.
…On Thu, Nov 30, 2017 at 10:06 AM, Till Backhaus ***@***.***> wrote:
Yes, limits are covered there (Rule 2: No namespace admin level resources
(limits, quota, policy, authorization rules)).
This leaves me frustrated though:
1. kubectl help get describes kubectl get all as List all resources
with different types. so I think I am right to expect *all* resources
to be listed.
2. It might be ok if adminstrative resources are hidden from a normal
user. As a cluster admin I *need* an easy way to see *everything* in a
namespace to decide if i can delete it or not.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#151 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABG_pyQoDwAuOBgKu-aylMQzae2yPZZZks5s7sR1gaJpZM4QtFDB>
.
|
@smarterclayton can you provide a link to the issue? I'm not concerned about kubernetes not deleting a namespace when I issue I'm concerned about the user interface issue. I expect to be able to list everything (preferrably via To me this is the same as being the admin of a linux box without |
I'd like to see a documentation improvement, as well as a new 'type' to use to actually show all resources in a namespace, as the current meaning of Currently I know that
This is only a partial list, as I have no way of knowing what are kinds of resources are listed by I think there needs to be better documentation around resources in general, and a better explanation of the magic |
Same issue here. Its returning only deployments, replicasets and pods |
We may want to explain |
@HartS That might be a decent place to start for documentation. For reference I got the below against my v1.10.0 Kube setup.
|
in 1.11, the help text no longer references
or
|
@liggitt does My use case is the same as the issue:
which doesn't return secrets, for example:
|
Try - |
this means you can combine it with
|
/close |
Why is this closed? Some complex xargs stuff does not mitigate the fact at "all" is indeed a falsehood that does not return all objects. |
|
Is there some other literate way to "verb" all by label? |
This also has the disadvantages of not only being unintuitive, but also slow as hell ... |
that also doesn't work:
|
@dene14 "Migrate releases from helm2 to helm3" sounds very much off topic to me. |
Crazy... Instead of fixing the buggy command they removed it from documentation. |
According to [0] kubectl get all -A does not include all types (e.g. configmaps) and is going to be deprecated. Instead of getting all objects with one kubectl request, doing the same for each object type separately. [0] kubernetes/kubectl#151 Change-Id: I624e785b95e0c5697a567251b42855545d771179 Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
List all available API resources in post mortem, vs only the subset covered by `kubectl get all`. This is the recommended practice: github.com/kubernetes/kubectl/issues/151#issuecomment-402003022 Also group listing all resources independently of group for listing any not-running Pods. Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
List all available API resources in post mortem, vs only the subset covered by `kubectl get all`. This is the recommended practice: github.com/kubernetes/kubectl/issues/151#issuecomment-402003022 Also group listing all resources independently of group for listing any not-running Pods. Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
List all available API resources in post mortem, vs only the subset covered by `kubectl get all`. This is the recommended practice: github.com/kubernetes/kubectl/issues/151#issuecomment-402003022 Also group listing all resources independently of group for listing any not-running Pods. Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
A much faster alternative to using
and if you put that into a file called |
@kesor Note however that under MacOS one has to add a |
upvote to fix |
@davidbIQ I'm not a Kubernetes contributor, but this issue is closed and most likely not monitored by anyone. Is anything stopping you from using the |
@davidbIQ there are plenty of different answers in this thread, if you can't find a suitable one, then script one for your self. |
Is there a reason on why the kubectl get-all is not integrated to the native/vanilla kubectl and also documented? |
@qgeffard the short answer is that the "all" special keyword was explicitly removed because it didn't play well with the way Long answer, read on:
For example, consider that you install a Kubernetes-native solution such as Istio (example picked semi-randomly, simply because it is popular). Now imagine that Istio uses the mechanism of categories mentioned above to tag each of their CRD with the "istio" category. You can now list all Istio-related objects with Now imagine that some of those category names, like "all", are reserved. You end up in a situation where a given keyword can have not one, not two, but three (!) different meanings. This is likely to confuse users and CRD authors alike so, instead of reserving some special keywords, it was decided that no category should be treated differently (in other words, "all" is a perfectly valid category as well). Thankfully, plugins are first-class citizens in I hope I helped better understand the "why" 🙏 |
The kinds="$(
for namespaced in "true" "false"; do
kubectl api-resources --verbs="list" -o name --no-headers --namespaced="${namespaced}"
done | sed -z 's/\n/,/g;s/,$/\n/'
)"
kubectl get "${kinds}" -A -o yaml > all_resources.yaml |
Just to note that to truly list all resources you should remove the
|
Because one cannot install anything on the CKAD exam. |
I'm using powershell so I'm not sure that would work, & I don't really want to install a plugin. |
Have a look at the issue's title: "... list all resources in a namespace" |
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.):
What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.):
get all, get all resources
Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT
Kubernetes version (use
kubectl version
):Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.2", GitCommit:"bdaeafa71f6c7c04636251031f93464384d54963", GitTreeState:"clean", BuildDate:"2017-10-24T19:48:57Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"8+", GitVersion:"v1.8.2-gke.0", GitCommit:"52ea03646e64b35a5b092ab32bb529400c296aa6", GitTreeState:"clean", BuildDate:"2017-10-24T23:31:18Z", GoVersion:"go1.8.3b4", Compiler:"gc", Platform:"linux/amd64"}
Environment:
gke
macos 10.12.6
What happened:
kubectl get all
does not list all resources in a namespace.What you expected to happen:
As a user performing
kubectl get all
I expect to see all objects in the current context, including limits.How to reproduce it (as minimally and precisely as possible):
The text was updated successfully, but these errors were encountered: