Merge pull request #12202 from daizuozhuo/kubectl
add jsonpath to kubectl
This commit is contained in:
@@ -43,7 +43,7 @@ resourcequotas (quota) or secrets.
|
||||
|
||||
.PP
|
||||
\fB\-o\fP, \fB\-\-output\fP=""
|
||||
Output format. One of: json|yaml|template|templatefile|wide.
|
||||
Output format. One of: json|yaml|template|templatefile|wide|jsonpath.
|
||||
|
||||
.PP
|
||||
\fB\-\-output\-version\fP=""
|
||||
@@ -67,8 +67,9 @@ resourcequotas (quota) or secrets.
|
||||
|
||||
.PP
|
||||
\fB\-t\fP, \fB\-\-template\fP=""
|
||||
Template string or path to template file to use when \-o=template or \-o=templatefile. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]
|
||||
Template string or path to template file to use when \-o=template, \-o=templatefile or \-o=jsonpath. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. The jsonpath template is composed of jsonpath expressions enclosed by {} [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]]
|
||||
|
||||
|
||||
.SH OPTIONS INHERITED FROM PARENT COMMANDS
|
||||
|
@@ -42,7 +42,7 @@ You can use \-\-output=template \-\-template=TEMPLATE to extract specific values
|
||||
|
||||
.PP
|
||||
\fB\-o\fP, \fB\-\-output\fP=""
|
||||
Output format. One of: json|yaml|template|templatefile|wide.
|
||||
Output format. One of: json|yaml|template|templatefile|wide|jsonpath.
|
||||
|
||||
.PP
|
||||
\fB\-\-output\-version\fP=""
|
||||
@@ -62,8 +62,9 @@ You can use \-\-output=template \-\-template=TEMPLATE to extract specific values
|
||||
|
||||
.PP
|
||||
\fB\-t\fP, \fB\-\-template\fP=""
|
||||
Template string or path to template file to use when \-o=template or \-o=templatefile. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]
|
||||
Template string or path to template file to use when \-o=template, \-o=templatefile or \-o=jsonpath. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. The jsonpath template is composed of jsonpath expressions enclosed by {} [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]]
|
||||
|
||||
|
||||
.SH OPTIONS INHERITED FROM PARENT COMMANDS
|
||||
|
@@ -60,7 +60,7 @@ re\-use the labels from the resource it exposes.
|
||||
|
||||
.PP
|
||||
\fB\-o\fP, \fB\-\-output\fP=""
|
||||
Output format. One of: json|yaml|template|templatefile|wide.
|
||||
Output format. One of: json|yaml|template|templatefile|wide|jsonpath.
|
||||
|
||||
.PP
|
||||
\fB\-\-output\-version\fP=""
|
||||
@@ -104,8 +104,9 @@ re\-use the labels from the resource it exposes.
|
||||
|
||||
.PP
|
||||
\fB\-t\fP, \fB\-\-template\fP=""
|
||||
Template string or path to template file to use when \-o=template or \-o=templatefile. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]
|
||||
Template string or path to template file to use when \-o=template, \-o=templatefile or \-o=jsonpath. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. The jsonpath template is composed of jsonpath expressions enclosed by {} [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]]
|
||||
|
||||
.PP
|
||||
\fB\-\-type\fP=""
|
||||
|
@@ -49,7 +49,7 @@ of the \-\-template flag, you can filter the attributes of the fetched resource(
|
||||
|
||||
.PP
|
||||
\fB\-o\fP, \fB\-\-output\fP=""
|
||||
Output format. One of: json|yaml|template|templatefile|wide.
|
||||
Output format. One of: json|yaml|template|templatefile|wide|jsonpath.
|
||||
|
||||
.PP
|
||||
\fB\-\-output\-version\fP=""
|
||||
@@ -69,8 +69,9 @@ of the \-\-template flag, you can filter the attributes of the fetched resource(
|
||||
|
||||
.PP
|
||||
\fB\-t\fP, \fB\-\-template\fP=""
|
||||
Template string or path to template file to use when \-o=template or \-o=templatefile. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]
|
||||
Template string or path to template file to use when \-o=template, \-o=templatefile or \-o=jsonpath. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. The jsonpath template is composed of jsonpath expressions enclosed by {} [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]]
|
||||
|
||||
.PP
|
||||
\fB\-w\fP, \fB\-\-watch\fP=false
|
||||
|
@@ -40,7 +40,7 @@ If \-\-resource\-version is specified, then updates will use this resource versi
|
||||
|
||||
.PP
|
||||
\fB\-o\fP, \fB\-\-output\fP=""
|
||||
Output format. One of: json|yaml|template|templatefile|wide.
|
||||
Output format. One of: json|yaml|template|templatefile|wide|jsonpath.
|
||||
|
||||
.PP
|
||||
\fB\-\-output\-version\fP=""
|
||||
@@ -68,8 +68,9 @@ If \-\-resource\-version is specified, then updates will use this resource versi
|
||||
|
||||
.PP
|
||||
\fB\-t\fP, \fB\-\-template\fP=""
|
||||
Template string or path to template file to use when \-o=template or \-o=templatefile. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]
|
||||
Template string or path to template file to use when \-o=template, \-o=templatefile or \-o=jsonpath. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. The jsonpath template is composed of jsonpath expressions enclosed by {} [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]]
|
||||
|
||||
|
||||
.SH OPTIONS INHERITED FROM PARENT COMMANDS
|
||||
|
@@ -48,7 +48,7 @@ existing replication controller and overwrite at least one (common) label in its
|
||||
|
||||
.PP
|
||||
\fB\-o\fP, \fB\-\-output\fP=""
|
||||
Output format. One of: json|yaml|template|templatefile|wide.
|
||||
Output format. One of: json|yaml|template|templatefile|wide|jsonpath.
|
||||
|
||||
.PP
|
||||
\fB\-\-output\-version\fP=""
|
||||
@@ -72,8 +72,9 @@ existing replication controller and overwrite at least one (common) label in its
|
||||
|
||||
.PP
|
||||
\fB\-t\fP, \fB\-\-template\fP=""
|
||||
Template string or path to template file to use when \-o=template or \-o=templatefile. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]
|
||||
Template string or path to template file to use when \-o=template, \-o=templatefile or \-o=jsonpath. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. The jsonpath template is composed of jsonpath expressions enclosed by {} [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]]
|
||||
|
||||
.PP
|
||||
\fB\-\-timeout\fP=5m0s
|
||||
|
@@ -56,7 +56,7 @@ Creates a replication controller to manage the created container(s).
|
||||
|
||||
.PP
|
||||
\fB\-o\fP, \fB\-\-output\fP=""
|
||||
Output format. One of: json|yaml|template|templatefile|wide.
|
||||
Output format. One of: json|yaml|template|templatefile|wide|jsonpath.
|
||||
|
||||
.PP
|
||||
\fB\-\-output\-version\fP=""
|
||||
@@ -92,8 +92,9 @@ Creates a replication controller to manage the created container(s).
|
||||
|
||||
.PP
|
||||
\fB\-t\fP, \fB\-\-template\fP=""
|
||||
Template string or path to template file to use when \-o=template or \-o=templatefile. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]
|
||||
Template string or path to template file to use when \-o=template, \-o=templatefile or \-o=jsonpath. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. The jsonpath template is composed of jsonpath expressions enclosed by {} [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]]
|
||||
|
||||
.PP
|
||||
\fB\-\-tty\fP=false
|
||||
|
103
docs/user-guide/jsonpath.md
Normal file
103
docs/user-guide/jsonpath.md
Normal file
@@ -0,0 +1,103 @@
|
||||
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
|
||||
|
||||
<!-- BEGIN STRIP_FOR_RELEASE -->
|
||||
|
||||
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
|
||||
width="25" height="25">
|
||||
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
|
||||
width="25" height="25">
|
||||
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
|
||||
width="25" height="25">
|
||||
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
|
||||
width="25" height="25">
|
||||
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
|
||||
width="25" height="25">
|
||||
|
||||
<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>
|
||||
|
||||
If you are using a released version of Kubernetes, you should
|
||||
refer to the docs that go with that version.
|
||||
|
||||
<strong>
|
||||
The latest 1.0.x release of this document can be found
|
||||
[here](http://releases.k8s.io/release-1.0/docs/user-guide/jsonpath.md).
|
||||
|
||||
Documentation for other releases can be found at
|
||||
[releases.k8s.io](http://releases.k8s.io).
|
||||
</strong>
|
||||
--
|
||||
|
||||
<!-- END STRIP_FOR_RELEASE -->
|
||||
|
||||
<!-- END MUNGE: UNVERSIONED_WARNING -->
|
||||
|
||||
# JSONPath template syntax
|
||||
|
||||
JSONPath template is composed of JSONPath expressions enclosed by {}.
|
||||
And we add three functions in addition to the original JSONPath syntax:
|
||||
|
||||
1. The `$` operator is optional since the expression always start from the root object by default.
|
||||
2. We can use `""` to quote text inside JSONPath expression.
|
||||
3. We can use `range` operator to iterate list.
|
||||
|
||||
|
||||
The result object is printed as its String() function.
|
||||
|
||||
Given the input:
|
||||
|
||||
```json
|
||||
{
|
||||
"kind": "List",
|
||||
"items":[
|
||||
{
|
||||
"kind":"None",
|
||||
"metadata":{"name":"127.0.0.1"},
|
||||
"status":{
|
||||
"capacity":{"cpu":"4"},
|
||||
"addresses":[{"type": "LegacyHostIP", "address":"127.0.0.1"}]
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind":"None",
|
||||
"metadata":{"name":"127.0.0.2"},
|
||||
"status":{
|
||||
"capacity":{"cpu":"8"},
|
||||
"addresses":[
|
||||
{"type": "LegacyHostIP", "address":"127.0.0.2"},
|
||||
{"type": "another", "address":"127.0.0.3"}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"users":[
|
||||
{
|
||||
"name": "myself",
|
||||
"user": {}
|
||||
},
|
||||
{
|
||||
"name": "e2e",
|
||||
"user": {"username": "admin", "password": "secret"}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Function | Description | Example | Result
|
||||
---------|--------------------|--------------------|------------------
|
||||
text | the plain text | kind is {.kind} | kind is List
|
||||
"" | quote | {"{"} | {
|
||||
@ | the current object | {@} | the same as input
|
||||
. or [] | child operator | {.kind} or {['kind']}| List
|
||||
.. | recursive descent | {..name} | 127.0.0.1 127.0.0.2 myself e2e
|
||||
* | wildcard. Get all objects| {.items[*].metadata.name} | [127.0.0.1 127.0.0.2]
|
||||
[start:end :step] | subscript operator | {.users[0].name}| myself
|
||||
[,] | union operator | {.items[*]['metadata.name', 'status.capacity']} | 127.0.0.1 127.0.0.2 map[cpu:4] map[cpu:8]
|
||||
?() | filter | {.users[?(@.name=="e2e")].user.password} | secret
|
||||
range, end | iterate list | {range .items[*]}[{.metadata.name}, {.status.capacity}] {end} | [127.0.0.1, map[cpu:4]] [127.0.0.2, map[cpu:8]]
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
@@ -81,13 +81,13 @@ $ kubectl annotate pods foo description-
|
||||
--all[=false]: select all resources in the namespace of the specified resource types
|
||||
-h, --help[=false]: help for annotate
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide.
|
||||
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath.
|
||||
--output-version="": Output the formatted object with the given version (default api-version).
|
||||
--overwrite[=false]: If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations.
|
||||
--resource-version="": If non-empty, the annotation update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource.
|
||||
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||
--sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||
-t, --template="": Template string or path to template file to use when -o=template or -o=templatefile. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]
|
||||
-t, --template="": Template string or path to template file to use when -o=template, -o=templatefile or -o=jsonpath. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. The jsonpath template is composed of jsonpath expressions enclosed by {} [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md]
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
@@ -123,7 +123,7 @@ $ kubectl annotate pods foo description-
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-18 17:36:23.97715989 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-08-13 08:45:23.477684199 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
@@ -64,12 +64,12 @@ $ kubectl config view -o template --template='{{range .users}}{{ if eq .name "e2
|
||||
--merge=true: merge together the full hierarchy of kubeconfig files
|
||||
--minify[=false]: remove all information not used by current-context from the output
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide.
|
||||
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath.
|
||||
--output-version="": Output the formatted object with the given version (default api-version).
|
||||
--raw[=false]: display raw byte data
|
||||
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||
--sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||
-t, --template="": Template string or path to template file to use when -o=template or -o=templatefile. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]
|
||||
-t, --template="": Template string or path to template file to use when -o=template, -o=templatefile or -o=jsonpath. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. The jsonpath template is composed of jsonpath expressions enclosed by {} [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md]
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
@@ -105,7 +105,7 @@ $ kubectl config view -o template --template='{{range .users}}{{ if eq .name "e2
|
||||
|
||||
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-18 17:36:23.977277472 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-08-13 08:45:23.478129098 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
@@ -76,7 +76,7 @@ $ kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream
|
||||
-l, --labels="": Labels to apply to the service created by this call.
|
||||
--name="": The name for the newly created object.
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide.
|
||||
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath.
|
||||
--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 the service should serve on. Copied from the resource being exposed, if unspecified
|
||||
@@ -87,7 +87,7 @@ $ kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream
|
||||
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||
--sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||
--target-port="": Name or number for the port on the container that the service should direct traffic to. Optional.
|
||||
-t, --template="": Template string or path to template file to use when -o=template or -o=templatefile. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]
|
||||
-t, --template="": Template string or path to template file to use when -o=template, -o=templatefile or -o=jsonpath. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. The jsonpath template is composed of jsonpath expressions enclosed by {} [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md]
|
||||
--type="": Type for this service: ClusterIP, NodePort, or LoadBalancer. Default is 'ClusterIP' unless --create-external-load-balancer is specified.
|
||||
```
|
||||
|
||||
@@ -124,7 +124,7 @@ $ kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-18 17:36:23.976918949 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-08-13 08:45:23.476872373 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
@@ -49,7 +49,7 @@ 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).
|
||||
|
||||
```
|
||||
kubectl get [(-o|--output=)json|yaml|template|wide|...] (TYPE [(NAME | -l label] | TYPE/NAME ...) [flags]
|
||||
kubectl get [(-o|--output=)json|yaml|template|templatefile|wide|jsonpath|...] (TYPE [NAME | -l label] | TYPE/NAME ...) [flags]
|
||||
```
|
||||
|
||||
### Examples
|
||||
@@ -88,12 +88,12 @@ $ kubectl get rc/web service/frontend pods/web-pod-13je7
|
||||
-h, --help[=false]: help for get
|
||||
-L, --label-columns=[]: Accepts a comma separated list of labels that are going to be presented as columns. Names are case-sensitive. You can also use multiple flag statements like -L label1 -L label2...
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide.
|
||||
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath.
|
||||
--output-version="": Output the formatted object with the given version (default api-version).
|
||||
-l, --selector="": Selector (label query) to filter on
|
||||
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||
--sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||
-t, --template="": Template string or path to template file to use when -o=template or -o=templatefile. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]
|
||||
-t, --template="": Template string or path to template file to use when -o=template, -o=templatefile or -o=jsonpath. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. The jsonpath template is composed of jsonpath expressions enclosed by {} [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md]
|
||||
-w, --watch[=false]: After listing/getting the requested object, watch for changes.
|
||||
--watch-only[=false]: Watch for changes to the requested object(s), without listing/getting first.
|
||||
```
|
||||
@@ -131,7 +131,7 @@ $ kubectl get rc/web service/frontend pods/web-pod-13je7
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-18 17:36:23.974605429 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-08-20 01:10:19.603989785 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
@@ -78,14 +78,14 @@ $ kubectl label pods foo bar-
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to update the labels
|
||||
-h, --help[=false]: help for label
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide.
|
||||
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath.
|
||||
--output-version="": Output the formatted object with the given version (default api-version).
|
||||
--overwrite[=false]: If true, allow labels to be overwritten, otherwise reject label updates that overwrite existing labels.
|
||||
--resource-version="": If non-empty, the labels update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource.
|
||||
-l, --selector="": Selector (label query) to filter on
|
||||
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||
--sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||
-t, --template="": Template string or path to template file to use when -o=template or -o=templatefile. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]
|
||||
-t, --template="": Template string or path to template file to use when -o=template, -o=templatefile or -o=jsonpath. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. The jsonpath template is composed of jsonpath expressions enclosed by {} [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md]
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
@@ -121,7 +121,7 @@ $ kubectl label pods foo bar-
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-18 17:36:23.977042997 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-08-20 01:10:19.61318045 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
@@ -75,13 +75,13 @@ $ kubectl rolling-update frontend --image=image:v2
|
||||
-h, --help[=false]: help for rolling-update
|
||||
--image="": Image to use for upgrading the replication controller. Can not be used with --filename/-f
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide.
|
||||
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath.
|
||||
--output-version="": Output the formatted object with the given version (default api-version).
|
||||
--poll-interval=3s: Time delay between polling for replication controller status after the update. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
|
||||
--rollback[=false]: If true, this is a request to abort an existing rollout that is partially rolled out. It effectively reverses current and next and runs a rollout
|
||||
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||
--sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||
-t, --template="": Template string or path to template file to use when -o=template or -o=templatefile. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]
|
||||
-t, --template="": Template string or path to template file to use when -o=template, -o=templatefile or -o=jsonpath. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. The jsonpath template is composed of jsonpath expressions enclosed by {} [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md]
|
||||
--timeout=5m0s: Max time to wait for a replication controller to update before giving up. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
|
||||
--update-period=1m0s: Time to wait between updating pods. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
|
||||
```
|
||||
@@ -119,7 +119,7 @@ $ kubectl rolling-update frontend --image=image:v2
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-18 17:36:23.97558907 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-08-20 01:10:19.606885893 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
@@ -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.
|
||||
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath.
|
||||
--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.
|
||||
@@ -91,7 +91,7 @@ $ kubectl run nginx --image=nginx --command -- <cmd> <arg1> ... <argN>
|
||||
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||
--sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||
-i, --stdin[=false]: Keep stdin open on the container(s) in the pod, even if nothing is attached.
|
||||
-t, --template="": Template string or path to template file to use when -o=template or -o=templatefile. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]
|
||||
-t, --template="": Template string or path to template file to use when -o=template, -o=templatefile or -o=jsonpath. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. The jsonpath template is composed of jsonpath expressions enclosed by {} [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md]
|
||||
--tty[=false]: Allocated a TTY for each container in the pod. Because -t is currently shorthand for --template, -t is not supported for --tty. This shorthand is deprecated and we expect to adopt -t for --tty soon.
|
||||
```
|
||||
|
||||
@@ -128,7 +128,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-18 17:36:23.976238275 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-08-14 06:15:57.11465464 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
Reference in New Issue
Block a user