Kubectl annotate command accepts a filename param

This commit is contained in:
feihujiang
2015-08-21 15:08:29 +08:00
parent ebe50ea692
commit 7291bde309
8 changed files with 84 additions and 9 deletions

View File

@@ -33,6 +33,10 @@ resourcequotas (quota) or secrets.
\fB\-\-all\fP=false
select all resources in the namespace of the specified resource types
.PP
\fB\-f\fP, \fB\-\-filename\fP=[]
Filename, directory, or URL to a file identifying the resource to update the annotation
.PP
\fB\-h\fP, \fB\-\-help\fP=false
help for annotate
@@ -179,6 +183,9 @@ resourcequotas (quota) or secrets.
# 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'

View File

@@ -156,7 +156,7 @@ $ kubectl describe nodes kubernetes\-minion\-emt8.c.myproject.internal
# Describe a pod
$ kubectl describe pods/nginx
# Describe a pod using the data in pod.json.
# Describe a pod identified by type and name in "pod.json"
$ kubectl describe \-f pod.json
# Describe all pods