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
etc. should support a -o name
(or similar option) for showing only kind/name, and make mutations more verbose by default
#5906
Comments
If we have -q, then we can make the default "create"/"update"/"delete"/"stop" commands be more verbose about what they are creating, which addresses #5579 |
We should document xargs usage somewhere. We might as well also use this issue for making the default output more verbose. |
Currently kubectl just prints object names without the kind. If they output kind/name instead, that would be more useful for this purpose. |
For get, you mean?
|
Hmm. kubectl sort of prints the kind now. If I create a file, say, with a v1beta3 RC and a service and do
I thought it didn't include the kind, but it does now, except that replicationControllers shouldn't be camelCase, esp. for v1beta3. |
The default resource name output hasn't changed yet, probably due to ordering in latest.RESTMapper. Will take a look at that.
|
Maybe this could just be another output format, like -o name. |
Sounds like it.
|
Discussion of script output vs. human-oriented output: #3894 (comment) |
The default terse output was cited as a source of confusion in our usability study. People didn't know whether it meant success, failure, a tool bug, or something else. |
We should probably spawn another issue for this, but putting here for expedience and consistency... “kubectl create returns a line of text ‘replacationcontrollers/redis-master’ is this an error? or success? (unix cmds usually produce no output on success)” |
kubectl get
should support a -q
(or similar option) for showing only resource/idkubectl get
etc. should support a -q
(or similar option) for showing only resource/id, and make mutations more verbose by default
What's the status here? Shall we go ahead and add a |
I think brian's proposal was an alternate output mode ("-o simple" or "-o quick") handled by the printer. Then change the default output to not be xargs compatible but be friendlier. ----- Original Message -----
|
@smarterclayton is correct. I suggest |
Name makes a lot of sense.
|
kubectl get
etc. should support a -q
(or similar option) for showing only resource/id, and make mutations more verbose by defaultkubectl get
etc. should support a -o name
(or similar option) for showing only kind/name, and make mutations more verbose by default
@bgrant0607 |
I think we should eventually support -o on all commands - it's mostly that On Jun 30, 2015, at 5:24 PM, Janet Kuo notifications@github.com wrote: @bgrant0607 https://github.com/bgrant0607 -o isn't supported in all — |
Discussed with @bgrant0607 and decided to add the following changes to only mutations*:
*Mutations include: create, delete, expose, label, patch, replace, rollingupdate, run, scale, stop |
cc @deads2k |
Later PRs can:
|
I like the idea of human readable by default and a separate flag for machine readable output flag. |
Some mutations ( |
@janetkuo points out that label, run, expose, and rolling-update commands don't adhere to the same output conventions as other mutations. We'll want to fix that. For instance, label is just another kind of patch, basically. |
When writing the user guide, it was definitely jarring that |
With #5903 commands will support "resource/name" as an arg, which means having -q (show only type/name) becomes valuable for chaining:
The text was updated successfully, but these errors were encountered: