-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
add server-side print docs #7671
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -192,6 +192,26 @@ NAME RSRC | |
submit-queue 610995 | ||
``` | ||
|
||
#### Server-side columns | ||
|
||
`kubectl` supports receiving specific column information from the server about objects. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the near future this will be the default and only way of interacting with the server. We're putting it here to gather feedback about the feature, especially the inconsistencies between the current behavior of kubectl. |
||
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. | ||
|
@@ -245,6 +265,9 @@ $ kubectl get ds --include-uninitialized | |
|
||
// List all pods running on node server01 | ||
$ kubectl get pods --field-selector=spec.nodeName=server01 | ||
|
||
// List all pods in plain-text output format, delegating the details of printing to the server | ||
$ kubectl get pods --experimental-server-print | ||
``` | ||
|
||
`kubectl describe` - Display detailed state of one or more resources, including the uninitialized ones by default. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who are the audiences for this content? Client tool developers? Integration solution developers?
kubectl
users?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API consumers.