CmdID

CmdID / Commands

kubectl-label

Label Kubernetes resources. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Label a pod

kubectl label [po pod_name key=valueIdentify

Update a pod label by overwriting the existing value

kubectl label [po pod_name key=value --overwriteIdentify
--overwriteIf true, allow labels to be overwritten, otherwise reject label updates that overwrite existing labels. kubectl reference

Label all pods in the namespace

kubectl label [po key=value --allIdentify
--allSelect all resources, in the namespace of the specified resource types kubectl reference

Label a pod identified by the pod definition file

kubectl label --filename pod_definition_file key=valueIdentify
--filenameFilename, directory, or URL to files identifying the resource to update the labels kubectl reference

Remove the label from a pod

kubectl label [po pod_name key-Identify