Clean up kubectl help for auto-gen'd kubectl.md

This commit is contained in:
MikeJeffrey
2015-02-03 09:59:21 -08:00
committed by Michael Jeffrey
parent 3f90de3f80
commit e5459c8802
14 changed files with 240 additions and 216 deletions

View File

@@ -34,28 +34,32 @@ import (
// retrieves one or more resources from a server.
func (f *Factory) NewCmdGet(out io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "get [(-o|--output=)json|yaml|...] <resource> [<id>]",
Use: "get [(-o|--output=)json|yaml|template|...] <resource> [<id>]",
Short: "Display one or many resources",
Long: `Display one or many resources.
Possible resources include pods (po), replication controllers (rc), services
(se), minions (mi), or events (ev).
If you specify a Go template, you can use any fields defined for the API version
you are connecting to the server with.
By specifying the output as 'template' and providing a Go template as the value
of the --template flag, you can filter the attributes of the fetched resource(s).
Examples:
$ kubectl get pods
<list all pods in ps output format>
$ kubectl get replicationController 1234-56-7890-234234-456456
<list single replication controller in ps output format>
$ kubectl get pods
// List all pods in ps output format.
$ kubectl get -o json pod 1234-56-7890-234234-456456
<list single pod in json output format>
$ kubectl get replicationController 1234-56-7890-234234-456456
// List a single replication controller with specified ID in ps output format.
$ kubectl get rc,services
<list replication controllers and services together in ps output format>`,
$ kubectl get -o json pod 1234-56-7890-234234-456456
// List a single pod in JSON output format.
$ kubectl get -o template pod 1234-56-7890-234234-456456 --template={{.currentState.status}}
// Return only the status value of the specified pod.
$ kubectl get rc,services
// List all replication controllers and services together in ps output format.`,
Run: func(cmd *cobra.Command, args []string) {
RunGet(f, out, cmd, args)
},