Difference between revisions of "Kubernetes labels"

From wikieduonline
Jump to navigation Jump to search
Line 34: Line 34:
 
* [[CKA v1.15]], [[CKA v1.21: Understand how to use Labels, Selector and Annotations]]
 
* [[CKA v1.15]], [[CKA v1.21: Understand how to use Labels, Selector and Annotations]]
 
* [[CKA v1.18]]: Use [[label]] selectors to [[schedule Pods]]
 
* [[CKA v1.18]]: Use [[label]] selectors to [[schedule Pods]]
* Read recommended labels: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
+
* Read [[recommended labels]]: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
  
 
== Related ==
 
== Related ==

Revision as of 08:12, 21 September 2023

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

eks.amazonaws.com/compute-type: fargate

See also

Advertising: