Kubectl annotate command accepts a filename param
This commit is contained in:
@@ -51,7 +51,7 @@ limitranges (limits), persistentvolumes (pv), persistentvolumeclaims (pvc),
|
||||
resourcequotas (quota) or secrets.
|
||||
|
||||
```
|
||||
kubectl annotate [--overwrite] RESOURCE NAME KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-version=version]
|
||||
kubectl annotate [--overwrite] (-f FILENAME | TYPE NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-version=version]
|
||||
```
|
||||
|
||||
### Examples
|
||||
@@ -61,6 +61,9 @@ kubectl annotate [--overwrite] RESOURCE NAME KEY_1=VAL_1 ... KEY_N=VAL_N [--reso
|
||||
# If the same annotation is set multiple times, only the last value will be applied
|
||||
$ kubectl annotate pods foo description='my frontend'
|
||||
|
||||
# Update a pod identified by type and name in "pod.json"
|
||||
$ kubectl annotate -f pod.json description='my frontend'
|
||||
|
||||
# Update pod 'foo' with the annotation 'description' and the value 'my frontend running nginx', overwriting any existing value.
|
||||
$ kubectl annotate --overwrite pods foo description='my frontend running nginx'
|
||||
|
||||
@@ -79,6 +82,7 @@ $ kubectl annotate pods foo description-
|
||||
|
||||
```
|
||||
--all[=false]: select all resources in the namespace of the specified resource types
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to update the annotation
|
||||
-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|jsonpath.
|
||||
@@ -123,7 +127,7 @@ $ kubectl annotate pods foo description-
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-20 22:01:12.4790376 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-08-21 07:07:55.977091863 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
Reference in New Issue
Block a user