Difference between revisions of "Kubernetes selectors"
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/ | ||
− | [[kubectl get pods]] [[--selector]]=app= | + | [[kubectl get pods]] [[--selector]]=app=YOUR_APP |
+ | |||
+ | [[kubectl get pods]] [[--selector]]=app=YOUR_APP -o=[[jsonpath]]='{.items[0].metadata.name}' | ||
[[selector:]] | [[selector:]] |
Revision as of 05:00, 2 November 2022
kubectl get pods --selector=app=YOUR_APP
kubectl get pods --selector=app=YOUR_APP -o=jsonpath='{.items[0].metadata.name}'
selector: ports:
Related
See also
Advertising: