Add -o name for commands which use printer to output results

Added a new printer which prints 'resource/name' pair of a given
object.
This commit is contained in:
hurf
2015-08-18 15:35:35 +08:00
parent 00e34429e0
commit d2d96ff6e1
20 changed files with 138 additions and 26 deletions

View File

@@ -82,7 +82,7 @@ $ kubectl run nginx --image=nginx --command -- <cmd> <arg1> ... <argN>
--image="": The image for the container to run.
-l, --labels="": Labels to apply to the pod(s).
--no-headers[=false]: When using the default output, don't print headers.
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath.
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath|name.
--output-version="": Output the formatted object with the given version (default api-version).
--overrides="": An inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field.
--port=-1: The port that this container exposes.
@@ -127,7 +127,7 @@ $ kubectl run nginx --image=nginx --command -- <cmd> <arg1> ... <argN>
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-08-25 10:17:24.593489492 +0000 UTC
###### Auto generated by spf13/cobra at 2015-08-26 09:03:39.976311407 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_run.md?pixel)]()