-
Notifications
You must be signed in to change notification settings - Fork 921
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
Need a real "get-all" command #527
Comments
/kind feature |
This functionality sounds like something that'd be great to implement as a plugin |
Where would I start? I know some Go and I have lots of software dev experience so that part is not a problem, it's more the logistics : how do I mark that I'm working on this so people know, where do I publish it for peer review, for downloading, etc. I found https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/, are there other links that I should look at? |
I am currently updating the docs for plugins, so that they are up to date with the current plugin system: kubernetes/website#10259, see https://deploy-preview-10259--kubernetes-io-master-staging.netlify.com/docs/tasks/extend-kubectl/kubectl-plugins/ (while that PR merges) for an accurate doc on the current state of plugins. You can also take a look at https://github.com/kubernetes/sample-cli-plugin for a detailed example of writing a plugin in Go.
Although there's no official registry or repo where you would formally declare your work on a plugin (for now), you are always welcome to host it on a repo of your own, and link to it in the slack channel for SIG-CLI, as well as request peer review there. I'd be happy to help review it as well. Feel free to reach out on Slack with any questions. |
@schollii plugin documentation has now been updated. You can find a guide for writing plugins under the new mechanism at: https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/#writing-kubectl-plugins |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle rotten |
@schollii Have a look at https://github.com/corneliusweig/ketall . It is also available via krew, so that it can be installed via |
quick hack: |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
I firmly believe that this functionality belongs in the core. It is unrealistic to say that you are displaying all kubernetes resources and it is misleading. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle rotten |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
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. |
/reopen |
This one of the the weirdest, most confusing things about learning k8s; the fact that "get all" means "get a few random things" . If "all" doesn't mean "all," rename it "common" or "basic" something. |
please /reopen |
Note that you can pass a comma-separated list of resource kinds to the
You can use the following command (no xargs required) to get literally all resource types:
|
@bendavis78 nice but I don't want to have to type that every time, nor create an alias for this on every system where I use kubectl. Given the API already exists, the change should be simple. I don't mind doing it I just need a go-ahead, and a little guidance. The api-resources command can likely be called via kubectl/pkg/cmd/apiresources/apiresources.go Line 137 in 3082866
Line 467 in 596d7b0
Am I getting this right? |
I'm not sure the historical context on this one but we can reopen until we get an official word out. /remove-lifecycle rotten |
@eddiezane: Reopened this issue. In response to this:
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. |
Following up..
We recommend using ketall which can be installed standalone or via krew. /close |
@eddiezane: Closing this issue. In response to this:
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. |
Wow. You have to install extra stuff to do something this basic? Bizarre. If the existing command is poorly implemented, and doesn't provide the results people expect, why can't it be re-implemented correctly? |
I was going to ask exactly that. I've outlined a solution, plus we could adapt code from ketall. /reopen please |
That plugin hasn't been updated in two years. |
FEATURE REQUEST:
Add a get-all command that really shows all objects, with some flags to filter on certain types (namespaced vs non-namespaced, etc).
Similarly, the dashboard should have a mode to show all resources (again, dashboard does not show networkpolicy objects, not even in pod descriptions to say "this pod is selected by this networkpolicy object". But dashboard improvement should be implemented separately, as the most important and urgent one is the kubectl new command.
Kubernetes version (use
kubectl version
):1.11.2
What happened:
kubectl get all
only shows a small subset of kubernetes objects in a cluster, and there does not seem to be a command to get all objects (secrets, network policies, etc). This caused me hours of wasted time because I was trying to replicate a deployment object from another cluster into a new cluster, and didn't see that there was a networkpolicy needed for the service to expose that deployment.What you expected to happen:
That
kubect get all
would show all, not just a small number of types of resources.How to reproduce it (as minimally and precisely as possible):
Create a networkpolicy then do
kubectl get all
, it doesn't show up. However, it does show up withkubectl get netpol
andkubectl api-resources -o name | xargs -t -n 1 kubectl get --ignore-not-found --show-kind | grep SOMETHING_IN_NAME
The text was updated successfully, but these errors were encountered: