Files
kubernetes/docs/man/man1/kubectl-label.1
Eric Paris 9e9fb9457f automatically generate man pages for kubectl
generate man pages for kubectl using the cobra.Command information.
This will directly create files in (by default) docs/man/man1/ called
kubectl*.1.  Each child verb/cobra command will gets its own man page.
2015-02-12 19:08:52 -05:00

74 lines
2.0 KiB
Groff

.TH "KUBERNETES" "1" " kubernetes User Manuals" "Eric Paris" "Jan 2015" ""
.SH NAME
.PP
kubectl label \- Update the labels on a resource
.SH SYNOPSIS
.PP
\fBkubectl label\fP [OPTIONS]
.SH DESCRIPTION
.PP
Update the labels on a resource.
.PP
If \-\-overwrite is true, then existing labels can be overwritten, otherwise attempting to overwrite a label will result in an error.
If \-\-resource\-version is specified, then updates will use this resource version, otherwise the existing resource\-version will be used.
.PP
Examples:
$ kubectl label pods foo unhealthy=true
<update a pod with the label 'unhealthy' and the value 'true'>
.PP
$ kubectl label \-\-overwrite pods foo status=unhealthy
<update a pod with the label 'status' and the value 'unhealthy' overwritting an existing value>
.PP
$ kubectl label pods foo status=unhealthy \-\-resource\-version=1
<update a pod with the label 'status' and the value 'unhealthy' if the resource is unchanged from version 1>
.PP
$ kubectl label pods foo bar\-
<update a pod by removing a label named 'bar' if it exists. Does not require the --overwrite flag.>
.SH OPTIONS
.PP
\fB\-\-no\-headers\fP=false
When using the default output, don't print headers.
.PP
\fB\-o\fP, \fB\-\-output\fP=""
Output format. One of: json|yaml|template|templatefile.
.PP
\fB\-\-output\-version\fP=""
Output the formatted object with the given version (default api\-version).
.PP
\fB\-\-overwrite\fP=false
If true, allow labels to be overwritten, otherwise reject label updates that overwrite existing labels.
.PP
\fB\-\-resource\-version\fP=""
If non\-empty, the labels update will only succeed if this is the current resource\-version for the object.
.PP
\fB\-t\fP, \fB\-\-template\fP=""
Template string or path to template file to use when \-o=template or \-o=templatefile.
.SH SEE ALSO
.PP
\fBkubectl(1)\fP,
.SH HISTORY
.PP
January 2015, Originally compiled by Eric Paris (eparis at redhat dot com) based on the kubernetes source material, but hopefully they have been automatically generated since!