Fix bad for in short options (#14253)

This one fixes issue #14211.

I just replaced `-o=parameter` instances with `-o parameter`.
This commit is contained in:
Renich Bon Ciric
2019-05-10 08:39:57 -05:00
committed by Kubernetes Prow Robot
parent c83f5b3c2e
commit 2f456da350
+13 -13
View File
@@ -166,48 +166,48 @@ The default output format for all `kubectl` commands is the human readable plain
#### Syntax #### Syntax
```shell ```shell
kubectl [command] [TYPE] [NAME] -o=<output_format> kubectl [command] [TYPE] [NAME] -o <output_format>
``` ```
Depending on the `kubectl` operation, the following output formats are supported: Depending on the `kubectl` operation, the following output formats are supported:
Output format | Description Output format | Description
--------------| ----------- --------------| -----------
`-o=custom-columns=<spec>` | Print a table using a comma separated list of [custom columns](#custom-columns). `-o custom-columns=<spec>` | Print a table using a comma separated list of [custom columns](#custom-columns).
`-o=custom-columns-file=<filename>` | Print a table using the [custom columns](#custom-columns) template in the `<filename>` file. `-o custom-columns-file=<filename>` | Print a table using the [custom columns](#custom-columns) template in the `<filename>` file.
`-o=json` | Output a JSON formatted API object. `-o json` | Output a JSON formatted API object.
`-o=jsonpath=<template>` | Print the fields defined in a [jsonpath](/docs/reference/kubectl/jsonpath/) expression. `-o jsonpath=<template>` | Print the fields defined in a [jsonpath](/docs/reference/kubectl/jsonpath/) expression.
`-o=jsonpath-file=<filename>` | Print the fields defined by the [jsonpath](/docs/reference/kubectl/jsonpath/) expression in the `<filename>` file. `-o jsonpath-file=<filename>` | Print the fields defined by the [jsonpath](/docs/reference/kubectl/jsonpath/) expression in the `<filename>` file.
`-o=name` | Print only the resource name and nothing else. `-o name` | Print only the resource name and nothing else.
`-o=wide` | Output in the plain-text format with any additional information. For pods, the node name is included. `-o wide` | Output in the plain-text format with any additional information. For pods, the node name is included.
`-o=yaml` | Output a YAML formatted API object. `-o yaml` | Output a YAML formatted API object.
##### Example ##### Example
In this example, the following command outputs the details for a single pod as a YAML formatted object: In this example, the following command outputs the details for a single pod as a YAML formatted object:
```shell ```shell
kubectl get pod web-pod-13je7 -o=yaml kubectl get pod web-pod-13je7 -o yaml
``` ```
Remember: See the [kubectl](/docs/user-guide/kubectl/) reference documentation for details about which output format is supported by each command. Remember: See the [kubectl](/docs/user-guide/kubectl/) reference documentation for details about which output format is supported by each command.
#### Custom columns #### Custom columns
To define custom columns and output only the details that you want into a table, you can use the `custom-columns` option. You can choose to define the custom columns inline or use a template file: `-o=custom-columns=<spec>` or `-o=custom-columns-file=<filename>`. To define custom columns and output only the details that you want into a table, you can use the `custom-columns` option. You can choose to define the custom columns inline or use a template file: `-o custom-columns=<spec>` or `-o custom-columns-file=<filename>`.
##### Examples ##### Examples
Inline: Inline:
```shell ```shell
kubectl get pods <pod-name> -o=custom-columns=NAME:.metadata.name,RSRC:.metadata.resourceVersion kubectl get pods <pod-name> -o custom-columns=NAME:.metadata.name,RSRC:.metadata.resourceVersion
``` ```
Template file: Template file:
```shell ```shell
kubectl get pods <pod-name> -o=custom-columns-file=template.txt kubectl get pods <pod-name> -o custom-columns-file=template.txt
``` ```
where the `template.txt` file contains: where the `template.txt` file contains: