Difference between revisions of "Kubernetes labels"
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
[[kubectl describe pod my-release-kubernetes-dashboard]] | [[kubectl describe pod my-release-kubernetes-dashboard]] | ||
.../... | .../... | ||
− | Labels: app.kubernetes.io/component=kubernetes-dashboard | + | Labels: [[app.kubernetes.io]]/component=kubernetes-dashboard |
app.kubernetes.io/instance=my-release | app.kubernetes.io/instance=my-release | ||
app.kubernetes.io/managed-by=Helm | app.kubernetes.io/managed-by=Helm | ||
app.kubernetes.io/name=kubernetes-dashboard | app.kubernetes.io/name=kubernetes-dashboard | ||
app.kubernetes.io/version=2.4.0 | app.kubernetes.io/version=2.4.0 | ||
− | helm.sh/chart=kubernetes-dashboard-5.0.4 | + | [[helm.sh]]/chart=kubernetes-dashboard-5.0.4 |
pod-template-hash=b8c4f9c87 | pod-template-hash=b8c4f9c87 | ||
.../... | .../... |
Revision as of 15:53, 30 July 2022
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
kubectl label pods -l app=LABEL new_label_tier=new_label_valuefe
kubectl label nodes <node-name> <label-key>=<label-value>
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 .../...
Activities
- CKA v1.15, CKA v1.21: Understand how to use Labels, Selector and Annotations
- CKA v1.18: Use label selectors to schedule Pods
Related
See also
Advertising: