Kubectl label command accepts a filename param

This commit is contained in:
feihujiang
2015-08-05 11:43:48 +08:00
parent a6148e79c3
commit 4b9afc516e
6 changed files with 89 additions and 6 deletions

View File

@@ -26,6 +26,10 @@ If \-\-resource\-version is specified, then updates will use this resource versi
\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 labels
.PP
\fB\-h\fP, \fB\-\-help\fP=false
help for label
@@ -176,6 +180,9 @@ $ kubectl label \-\-overwrite pods foo status=unhealthy
# Update all pods in the namespace
$ kubectl label pods \-\-all status=unhealthy
# Update a pod identified by the type and name in "pod.json"
$ kubectl label \-f pod.json status=unhealthy
# Update pod 'foo' only if the resource is unchanged from version 1.
$ kubectl label pods foo status=unhealthy \-\-resource\-version=1