Skip to content

Commit

Permalink
add server-side print docs
Browse files Browse the repository at this point in the history
  • Loading branch information
juanvallejo committed Mar 7, 2018
1 parent 7dd01bd commit e0a8f30
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/reference/kubectl/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,26 @@ NAME RSRC
submit-queue 610995
```

#### Server-side columns

`kubectl` supports receiving specific column information from the server about objects.
This means that for any given resource, the server will return columns and rows relevant to that resource, for the client to print.
This allows for consistent human-readable output across clients used against the same cluster, by having the server encapsulate the details of printing.

To output object information using this feature, you can add the `--experimental-server-print` flag to a supported `kubectl` command.

##### Examples

```shell
$ kubectl get pods <pod-name> --experimental-server-print
```

The result of running this command is:

```shell
NAME READY STATUS RESTARTS AGE
pod-name 1/1 Running 0 1m

### Sorting list objects

To output objects to a sorted list in your terminal window, you can add the `--sort-by` flag to a supported `kubectl` command. Sort your objects by specifying any numeric or string field with the `--sort-by` flag. To specify a field, use a [jsonpath](/docs/user-guide/jsonpath) expression.
Expand Down

0 comments on commit e0a8f30

Please sign in to comment.