Difference between revisions of "Kubernetes labels"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
 
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
  
* <code>[[kubectl label]] pods -l app=LABEL new_label_tier=new_label_valuefe</code>
+
* <code>[[kubectl label]] pods -l [[app]]=LABEL new_label_tier=new_label_valuefe</code>
 
* <code>[[kubectl label]] [[nodes]] <node-name> <label-key>=<label-value></code>
 
* <code>[[kubectl label]] [[nodes]] <node-name> <label-key>=<label-value></code>
  

Revision as of 11:05, 26 December 2022

https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

kubectl get pods -l environment=myproduction,tier=myfrontend
kubectl get pods -l 'environment in (myproduction, myqa)'
.../...
metadata:
 labels:
.../...
kubectl describe pod my-release-kubernetes-dashboard
.../...
Labels:       app.kubernetes.io/component=kubernetes-dashboard
             app.kubernetes.io/instance=my-release
             app.kubernetes.io/managed-by=Helm
             app.kubernetes.io/name=kubernetes-dashboard
             app.kubernetes.io/version=2.4.0
             helm.sh/chart=kubernetes-dashboard-5.0.4
             pod-template-hash=b8c4f9c87
.../...


 labels:
   addonmanager.kubernetes.io/mode: EnsureExists


Activities

Related

See also

Advertising: