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

update kubectl help output for better organization #25524

Merged
merged 1 commit into from
Aug 21, 2016

Conversation

adohe-zz
Copy link

@adohe-zz adohe-zz commented May 12, 2016

Pull Request Guidelines

  1. Please read our contributor guidelines.
  2. See our developer guide.
  3. Follow the instructions for labeling and writing a release note for this PR in the block below.
* Use the release-note-* labels to set the release note state 
* Clear this block to use the PR title as the release note 
-OR-
* Enter your extended release note here

Analytics


This change is Reviewable

@adohe-zz
Copy link
Author

adohe-zz commented May 12, 2016

Please refer #21585 for more detail. Add the initial implementation, @bgrant0607 @smarterclayton @janetkuo ptal.

@k8s-github-robot k8s-github-robot added kind/old-docs size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 12, 2016
@bgrant0607
Copy link
Member

Thanks @adohe!

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 12, 2016
@janetkuo janetkuo added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels May 12, 2016
@@ -105,7 +107,11 @@ docs/user-guide/kubectl/kubectl_rollout_resume.md
docs/user-guide/kubectl/kubectl_rollout_undo.md
docs/user-guide/kubectl/kubectl_run.md
docs/user-guide/kubectl/kubectl_scale.md
<<<<<<< HEAD
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unresolved merge conflict

@janetkuo
Copy link
Member

Needs a rebase.

@adohe-zz
Copy link
Author

@janetkuo will do it today.

@smarterclayton
Copy link
Contributor

Looks mostly ok to me

cmds.AddCommand(NewCmdConvert(f, out))
groups := templates.CommandGroups{
{
Message: "Basic Commads:",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: Commands

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run and expose should be basics

@janetkuo
Copy link
Member

@adohe can you put the help output in the PR description (and update it when updating this PR)?

NewCmdRollingUpdate(f, out),
NewCmdScale(f, out),
NewCmdAutoscale(f, out),
rollout.NewCmdRollout(f, out),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More rollout to before rolling-update

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: Move

@adohe-zz adohe-zz force-pushed the kubectl_reorg branch 2 times, most recently from 9c83195 to 2d71cb2 Compare May 21, 2016 16:46
@adohe-zz
Copy link
Author

@janetkuo ptal. And the help output is:

[tony@localhost kubernetes]$ cluster/kubectl.sh --help
kubectl controls the Kubernetes cluster manager.

Find more information at https://github.com/kubernetes/kubernetes.

Basic Commands:
  create         Create a resource by filename or stdin
  get            Display one or many resources
  edit           Edit a resource on the server
  set            Set specific features on objects
  delete         Delete resources by filenames, stdin, resources and names, or by resources and label selector.
  explain        Documentation of resources.
  run            Run a particular image on the cluster.
  expose         Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service

Deploy Commands:
  rollout        rollout manages a deployment
  rolling-update Perform a rolling update of the given ReplicationController.
  scale          Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job.
  autoscale      Auto-scale a Deployment, ReplicaSet, or ReplicationController

Cluster Management Commands:
  cluster-info   Display cluster info
  cordon         Mark node as unschedulable
  drain          Drain node in preparation for maintenance
  uncordon       Mark node as schedulable
  taint          Update the taints on one or more nodes

Troubleshooting and Debugging Commands:
  describe       Show details of a specific resource or group of resources
  logs           Print the logs for a container in a pod.
  attach         Attach to a running container.
  exec           Execute a command in a container.
  port-forward   Forward one or more local ports to a pod.
  proxy          Run a proxy to the Kubernetes API server

Advanced Commands:
  patch          Update field(s) of a resource using strategic merge patch.
  replace        Replace a resource by filename or stdin.
  apply          Apply a configuration to a resource by filename or stdin
  convert        Convert config files between different API versions

Settings Commands:
  config         config modifies kubeconfig files
  label          Update the labels on a resource
  annotate       Update the annotations on a resource

Other Commands:
  version        Print the client and server version information.
  api-versions   Print the supported API versions on the server, in the form of "group/version".
  help           Help about any command

Use "kubectl help <command>" for more information about a given command.
Use "kubectl options" for a list of global command-line options (applies to all commands).

@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 21, 2016
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 22, 2016
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 23, 2016
@janetkuo
Copy link
Member

@adohe thanks! Looks pretty nice.
A few more suggestions:

  • config: does it belong to Cluster Management?
  • apply: suggest putting it to be the first of advanced commands
  • place uncordon right after cordon

@smarterclayton
Copy link
Contributor

I don't think of config as managing clusters - it's possible the name of Cluster Management should be clearer.

@adohe-zz
Copy link
Author

adohe-zz commented Aug 19, 2016

[root@localhost kubernetes]# kc help
kubectl controls the Kubernetes cluster manager.

Find more information at https://github.com/kubernetes/kubernetes.
Basic Commands (Beginner):
  create         Create a resource by filename or stdin
  expose         Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service
  run            Run a particular image on the cluster
  set            Set specific features on objects

Basic Commands (Intermediate):
  get            Display one or many resources
  explain        Documentation of resources
  edit           Edit a resource on the server
  delete         Delete resources by filenames, stdin, resources and names, or by resources and label selector

Deploy Commands:
  rollout        Manage a deployment rollout
  rolling-update Perform a rolling update of the given ReplicationController
  scale          Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job
  autoscale      Auto-scale a Deployment, ReplicaSet, or ReplicationController

Cluster Management Commands:
  cluster-info   Display cluster info
  top            Display Resource (CPU/Memory/Storage) usage
  cordon         Mark node as unschedulable
  uncordon       Mark node as schedulable
  drain          Drain node in preparation for maintenance
  taint          Update the taints on one or more nodes

Troubleshooting and Debugging Commands:
  describe       Show details of a specific resource or group of resources
  logs           Print the logs for a container in a pod
  attach         Attach to a running container
  exec           Execute a command in a container
  port-forward   Forward one or more local ports to a pod
  proxy          Run a proxy to the Kubernetes API server

Advanced Commands:
  apply          Apply a configuration to a resource by filename or stdin
  patch          Update field(s) of a resource using strategic merge patch
  replace        Replace a resource by filename or stdin
  convert        Convert config files between different API versions

Settings Commands:
  label          Update the labels on a resource
  annotate       Update the annotations on a resource
  completion     Output shell completion code for the given shell (bash or zsh)

Other Commands:
  api-versions   Print the supported API versions on the server, in the form of "group/version"
  config         Modify kubeconfig files
  help           Help about any command
  version        Print the client and server version information


Usage:
  kubectl [command]

Use "kubectl <command> --help" for more information about a given command.
Use "kubectl options" for a list of global command-line options (applies to all commands).

[root@localhost kubernetes]# kc --help
kubectl controls the Kubernetes cluster manager.

Find more information at https://github.com/kubernetes/kubernetes.
Basic Commands (Beginner):
  create         Create a resource by filename or stdin
  expose         Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service
  run            Run a particular image on the cluster
  set            Set specific features on objects

Basic Commands (Intermediate):
  get            Display one or many resources
  explain        Documentation of resources
  edit           Edit a resource on the server
  delete         Delete resources by filenames, stdin, resources and names, or by resources and label selector

Deploy Commands:
  rollout        Manage a deployment rollout
  rolling-update Perform a rolling update of the given ReplicationController
  scale          Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job
  autoscale      Auto-scale a Deployment, ReplicaSet, or ReplicationController

Cluster Management Commands:
  cluster-info   Display cluster info
  top            Display Resource (CPU/Memory/Storage) usage
  cordon         Mark node as unschedulable
  uncordon       Mark node as schedulable
  drain          Drain node in preparation for maintenance
  taint          Update the taints on one or more nodes

Troubleshooting and Debugging Commands:
  describe       Show details of a specific resource or group of resources
  logs           Print the logs for a container in a pod
  attach         Attach to a running container
  exec           Execute a command in a container
  port-forward   Forward one or more local ports to a pod
  proxy          Run a proxy to the Kubernetes API server

Advanced Commands:
  apply          Apply a configuration to a resource by filename or stdin
  patch          Update field(s) of a resource using strategic merge patch
  replace        Replace a resource by filename or stdin
  convert        Convert config files between different API versions

Settings Commands:
  label          Update the labels on a resource
  annotate       Update the annotations on a resource
  completion     Output shell completion code for the given shell (bash or zsh)

Other Commands:
  api-versions   Print the supported API versions on the server, in the form of "group/version"
  config         Modify kubeconfig files
  help           Help about any command
  version        Print the client and server version information


Usage:
  kubectl [command]

Use "kubectl <command> --help" for more information about a given command.
Use "kubectl options" for a list of global command-line options (applies to all commands).

since kubectl top is a new command, I just put it in cluster management part, is that ok? @smarterclayton @janetkuo @fabianofranz ptal.

@adohe-zz adohe-zz force-pushed the kubectl_reorg branch 2 times, most recently from 9c343b8 to 9ab896b Compare August 19, 2016 04:07
@fabianofranz
Copy link
Contributor

@adohe looks like there are a few problems with linebreak balancing (some missing, some places with two in a row), left from the changes required to move the Usage section to the bottom. Give me a few minutes to fix it then I'll PR it to your repo so you can add it here.

@smarterclayton
Copy link
Contributor

I think cluster management is the right place for top.

On Fri, Aug 19, 2016 at 2:01 PM, Fabiano Franz notifications@github.com
wrote:

@adohe https://github.com/AdoHe looks like there are a few problems
with linebreak balancing (some missing, some places with two in a row),
left from the changes required to move the Usage section to the bottom.
Give me a few minutes to fix it then I'll PR it to your repo so you can add
it here.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#25524 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABG_p_pNHu-H-8m6p-biNjbzBZTUcytSks5qhe9sgaJpZM4IcwGY
.

@janetkuo
Copy link
Member

+1 for putting top under cluster management

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@fabianofranz
Copy link
Contributor

LGTM after the changes in adohe-zz#1 were included. @smarterclayton @janetkuo mind looking and tagging?

@adohe-zz
Copy link
Author

@fabianofranz really thanks for your help :)

@adohe-zz
Copy link
Author

@k8s-bot test this issue: #IGNORE

@adohe-zz
Copy link
Author

@janetkuo ptal.

@smarterclayton smarterclayton added this to the v1.4 milestone Aug 20, 2016
@smarterclayton smarterclayton added priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Aug 20, 2016
@adohe-zz
Copy link
Author

@k8s-bot test this issue: #IGNORE

1 similar comment
@adohe-zz
Copy link
Author

@k8s-bot test this issue: #IGNORE

@k8s-bot
Copy link

k8s-bot commented Aug 21, 2016

GCE e2e build/test passed for commit b411fe2.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Aug 21, 2016

GCE e2e build/test passed for commit b411fe2.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit a956dd1 into kubernetes:master Aug 21, 2016
@adohe-zz adohe-zz deleted the kubectl_reorg branch August 21, 2016 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants