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

Document kubectl syntax/usage/output conventions #6797

Closed
bgrant0607 opened this issue Apr 14, 2015 · 12 comments
Closed

Document kubectl syntax/usage/output conventions #6797

bgrant0607 opened this issue Apr 14, 2015 · 12 comments
Assignees
Labels
area/kubectl kind/documentation Categorizes issue or PR as related to documentation. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@bgrant0607
Copy link
Member

I'm thinking of something like api-conventions.md, but for kubectl. It should at least cover the general command patterns, common arguments, and typical output.

Example topics to cover:

  • Ways in which objects can be specified
  • Commands are lowercase, w/ dashes for multiple words
  • Resource kinds are all lowercase rather than camelcase, no hyphens
  • The difference between get and describe
  • Command-line flags corresponding to API fields should accept API enums exactly (e.g., --restart=Always)

If not too long, the overall kubectl.md could be a reasonable place to put the text.

cc @smarterclayton @jlowdermilk @ghodss

@bgrant0607 bgrant0607 added priority/backlog Higher priority than priority/awaiting-more-evidence. kind/documentation Categorizes issue or PR as related to documentation. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. area/kubectl labels Apr 14, 2015
@bgrant0607 bgrant0607 added this to the v1.0 milestone Apr 14, 2015
@nikhiljindal
Copy link
Contributor

Another thing that we had discussed:

  • Explicitly specify the api-version flag when using -o template, so that the command does not break when the default api version used by kubectl is updated.

@ghodss
Copy link
Contributor

ghodss commented Apr 24, 2015

+1. In theory it could be expanded to cli-conventions.md, though I think kubectl operates quite differently than most of our other daemons. But it still may be wise for it to cover other command-line tools besides kubectl, like simplegen, podex, etc.

@bgrant0607 bgrant0607 added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed priority/backlog Higher priority than priority/awaiting-more-evidence. labels Apr 27, 2015
@bgrant0607 bgrant0607 self-assigned this Apr 27, 2015
@bgrant0607 bgrant0607 modified the milestones: v1.0-post, v1.0 May 7, 2015
@bgrant0607
Copy link
Member Author

VERB and VERB NOUN, not NOUN VERB. We may need to reconsider kubectl config.

@bgrant0607 bgrant0607 removed their assignment May 13, 2015
@smarterclayton
Copy link
Contributor

That being said, if you have sets of functionality that are distinct, sometimes it's nice to keep them separate (treat kubectl config like kubectl-config).

On May 13, 2015, at 7:43 PM, Brian Grant notifications@github.com wrote:

VERB and VERB NOUN, not NOUN VERB. We may need to reconsider kubectl config.


Reply to this email directly or view it on GitHub.

@bgrant0607
Copy link
Member Author

Also output conventions: #7843 (comment)

@bgrant0607
Copy link
Member Author

More output conventions: #3894 (comment)

@bgrant0607
Copy link
Member Author

More output conventions: #8476

@bgrant0607
Copy link
Member Author

Only use templates when writing reusable scripts. Human output formats may change.

@bgrant0607
Copy link
Member Author

Errors output to stderr rather than (or in addition to) glog: #9357

@bgrant0607
Copy link
Member Author

cc @janetkuo

@bgrant0607 bgrant0607 changed the title Document kubectl syntax/usage conventions Document kubectl syntax/usage/output conventions Jul 1, 2015
@bgrant0607
Copy link
Member Author

More output conventions:

@bgrant0607
Copy link
Member Author

We also want conventions for:

  1. Showing what a mutation would do, without doing it, aka --dry-run
  2. Showing what a mutation did, by automatically getting the current object
  3. Printing or describing (Describers should be able to print objects from somewhere besides the server #4471) a local object rather than one fetched from the server

All of these should be orthogonal to output format (default, wide, json, yaml, template).

@bgrant0607 bgrant0607 removed this from the v1.0-post milestone Jul 24, 2015
@bgrant0607 bgrant0607 added team/ux and removed sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. labels Aug 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubectl kind/documentation Categorizes issue or PR as related to documentation. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

4 participants