mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 16:06:51 +00:00
Kubectl label command accepts a filename param
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user