Difference between revisions of "Kubectl label"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
 
(5 intermediate revisions by 4 users not shown)
Line 3: Line 3:
 
__NOTOC__
 
__NOTOC__
 
== Commands ==
 
== Commands ==
[[kubectl label --help]]
+
* <code>[[kubectl label --help]]</code>
[[kubectl]] label [[pods]] my-pod new-label=awesome_label  
+
* <code>[[kubectl label pods]] my-pod new-label=awesome_label</code>
kubectl label [[nodes]] <node-name> <label-key>=<label-value>
+
* <code>[[kubectl label nodes]] <node-name> <label-key>=<label-value></code>
kubectl label [[Kubernetes namespaces|namespace]] default [[istio]]-injection=enabled
+
* <code>[[kubectl label namespace]] default [[istio]]-injection=enabled</code>
  
 
== Examples ==
 
== Examples ==
Line 16: Line 16:
 
  kubectl label
 
  kubectl label
 
  error: one or more resources must be specified as <resource> <name> or <resource>/<name>
 
  error: one or more resources must be specified as <resource> <name> or <resource>/<name>
 
  
 
== Related terms ==
 
== Related terms ==
Line 23: Line 22:
 
* <code>[[kubectl get pods --show-labels]]</code>
 
* <code>[[kubectl get pods --show-labels]]</code>
 
* <code>[[eks.amazonaws.com/compute-type: fargate]]</code>
 
* <code>[[eks.amazonaws.com/compute-type: fargate]]</code>
 +
* <code>[[labels:]]</code>
  
 
== Activities ==
 
== Activities ==

Latest revision as of 14:55, 20 November 2023

kubectl label Update labels on resources (k8.io)

Commands[edit]

Examples[edit]

kubectl label namespace default istio-injection=enabled
namespace/default labeled
Related: Install Istio

Errors[edit]

kubectl label
error: one or more resources must be specified as <resource> <name> or <resource>/<name>

Related terms[edit]

Activities[edit]

See also[edit]

Advertising: